Class: Apify::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/apify/client.rb

Instance Method Summary collapse

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(options)
  @host = options[:host] or raise "Missing :host parameter"
  @port = options[:port]
  @protocol = options[:protocol] || 'http'
  @user = options[:user]
  @password = options[: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