Class: TicketSharing::Client
- Inherits:
-
Object
- Object
- TicketSharing::Client
- Defined in:
- lib/ticket_sharing/client.rb
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
-
#initialize(base_url, credentials = nil) ⇒ Client
constructor
A new instance of Client.
- #post(path, body, options = {}) ⇒ Object
- #put(path, body, options = {}) ⇒ Object
- #success? ⇒ Boolean
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, ={}) send_request(:delete, path, '', ) end |
#post(path, body, options = {}) ⇒ Object
14 15 16 |
# File 'lib/ticket_sharing/client.rb', line 14 def post(path, body, ={}) send_request(:post, path, body, ) end |
#put(path, body, options = {}) ⇒ Object
18 19 20 |
# File 'lib/ticket_sharing/client.rb', line 18 def put(path, body, ={}) send_request(:put, path, body, ) end |
#success? ⇒ Boolean
26 27 28 |
# File 'lib/ticket_sharing/client.rb', line 26 def success? @success end |