Class: CloudPrint::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudprint/connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Connection

Returns a new instance of Connection.



8
9
10
# File 'lib/cloudprint/connection.rb', line 8

def initialize client
  @client = client
end

Instance Method Details

#get(path, params = {}) ⇒ Object



12
13
14
15
# File 'lib/cloudprint/connection.rb', line 12

def get(path, params = {})
  response = request(:get, path, params)
  parse_response(response)
end

#multipart_post(path, params = {}) ⇒ Object



22
23
24
25
# File 'lib/cloudprint/connection.rb', line 22

def multipart_post(path, params = {})
  response = request(:multipart, path, params)
  parse_response(response)
end

#post(path, params = {}) ⇒ Object



17
18
19
20
# File 'lib/cloudprint/connection.rb', line 17

def post(path, params = {})
  response = request(:post, path, params)
  parse_response(response)
end