Class: TicketSharing::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(base_url, credentials = nil) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
12
# File 'lib/ticket_sharing/client.rb', line 7

def initialize(base_url, credentials=nil)
  @base_url    = base_url
  @credentials = credentials

  @requester = TicketSharing::Request.new(TicketSharing.connection)
end

Instance Method Details

#delete(path, options = {}) ⇒ Object



22
23
24
# File 'lib/ticket_sharing/client.rb', line 22

def delete(path, options={})
  send_request(:delete, path, '', options)
end

#post(path, body, options = {}) ⇒ Object



14
15
16
# File 'lib/ticket_sharing/client.rb', line 14

def post(path, body, options={})
  send_request(:post, path, body, options)
end

#put(path, body, options = {}) ⇒ Object



18
19
20
# File 'lib/ticket_sharing/client.rb', line 18

def put(path, body, options={})
  send_request(:put, path, body, options)
end

#success?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/ticket_sharing/client.rb', line 26

def success?
  @success
end