Class: Prowly::Interface
- Inherits:
-
Object
- Object
- Prowly::Interface
- Includes:
- Singleton
- Defined in:
- lib/prowly/interface.rb
Overview
Defined Under Namespace
Modules: Command Classes: NoAPIKeyGiven
Instance Method Summary collapse
-
#call(command, params) ⇒ Object
Make the actual call to the prowl api.
-
#initialize ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize ⇒ Interface
Returns a new instance of Interface.
20 21 22 |
# File 'lib/prowly/interface.rb', line 20 def initialize @url = "https://api.prowlapp.com/publicapi" end |
Instance Method Details
#call(command, params) ⇒ Object
Make the actual call to the prowl api
25 26 27 28 29 30 |
# File 'lib/prowly/interface.rb', line 25 def call(command, params) @command = command request = Net::HTTP::Get.new(uri.request_uri + "?" + params) response = http.request(request) Response.new(response.body, response) end |