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.
10 11 12 13 14 15 16 |
# File 'lib/apify/client.rb', line 10 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
30 31 32 |
# File 'lib/apify/client.rb', line 30 def delete(*args) request(:delete, *args) end |
#get(*args) ⇒ Object
18 19 20 |
# File 'lib/apify/client.rb', line 18 def get(*args) request(:get, *args) end |
#post(*args) ⇒ Object
22 23 24 |
# File 'lib/apify/client.rb', line 22 def post(*args) request(:post, *args) end |
#put(*args) ⇒ Object
26 27 28 |
# File 'lib/apify/client.rb', line 26 def put(*args) request(:put, *args) end |