Class: Flukso::API
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client, base_url) ⇒ API
constructor
A new instance of API.
- #perform_delete(path, options = {}) ⇒ Object
- #perform_get(path, options = {}) ⇒ Object
- #perform_post(path, options = {}) ⇒ Object
- #perform_put(path, options = {}) ⇒ Object
Constructor Details
#initialize(client, base_url) ⇒ API
Returns a new instance of API.
63 64 65 66 |
# File 'lib/flukso/api.rb', line 63 def initialize(client, base_url) @client = client @base_url = base_url end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
61 62 63 |
# File 'lib/flukso/api.rb', line 61 def client @client end |
Instance Method Details
#perform_delete(path, options = {}) ⇒ Object
80 81 82 |
# File 'lib/flukso/api.rb', line 80 def perform_delete(path, ={}) Flukso::Request.delete(self, @base_url+path, add_version_header()) end |
#perform_get(path, options = {}) ⇒ Object
68 69 70 |
# File 'lib/flukso/api.rb', line 68 def perform_get(path, ={}) Flukso::Request.get(self, @base_url+path, ) end |