Class: Apify::Client
- Inherits:
-
Object
- Object
- Apify::Client
- Defined in:
- lib/apify/client.rb
Instance Method Summary collapse
- #delete(*args) ⇒ Object
- #get(*args) ⇒ Object
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #post(*args) ⇒ Object
- #put(*args) ⇒ Object
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 17 |
# File 'lib/apify/client.rb', line 11 def initialize() @host = [:host] or raise "Missing :host parameter" @port = [:port] @protocol = [:protocol] || 'http' @user = [:user] @password = [:password] end |
Instance Method Details
#delete(*args) ⇒ Object
31 32 33 |
# File 'lib/apify/client.rb', line 31 def delete(*args) request(:delete, *args) end |
#get(*args) ⇒ Object
19 20 21 |
# File 'lib/apify/client.rb', line 19 def get(*args) request(:get, *args) end |
#post(*args) ⇒ Object
23 24 25 |
# File 'lib/apify/client.rb', line 23 def post(*args) request(:post, *args) end |
#put(*args) ⇒ Object
27 28 29 |
# File 'lib/apify/client.rb', line 27 def put(*args) request(:put, *args) end |