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.
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, ={}) send_request(:delete, path, '', ) end |
#post(path, body, options = {}) ⇒ Object
11 12 13 |
# File 'lib/ticket_sharing/client.rb', line 11 def post(path, body, ={}) send_request(:post, path, body, ) end |
#put(path, body, options = {}) ⇒ Object
15 16 17 |
# File 'lib/ticket_sharing/client.rb', line 15 def put(path, body, ={}) send_request(:put, path, body, ) end |
#success? ⇒ Boolean
23 24 25 |
# File 'lib/ticket_sharing/client.rb', line 23 def success? @success end |