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.



6
7
8
9
# File 'lib/ticket_sharing/client.rb', line 6

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

Instance Method Details

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



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

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

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



11
12
13
# File 'lib/ticket_sharing/client.rb', line 11

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

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



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

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

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  @success
end