Class: Xively::Client
- Includes:
- HTTParty
- Defined in:
- lib/xively-rb/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Class Method Summary collapse
Instance Method Summary collapse
- #delete(url, options = {}) ⇒ Object
- #get(url, options = {}) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #post(url, options = {}) ⇒ Object
- #put(url, options = {}) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
13 14 15 |
# File 'lib/xively-rb/client.rb', line 13 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/xively-rb/client.rb', line 7 def api_key @api_key end |
Class Method Details
Instance Method Details
#delete(url, options = {}) ⇒ Object
21 22 23 |
# File 'lib/xively-rb/client.rb', line 21 def delete(url, = {}) self.class.delete(url, ()) end |
#get(url, options = {}) ⇒ Object
17 18 19 |
# File 'lib/xively-rb/client.rb', line 17 def get(url, = {}) self.class.get(url, ()) end |
#post(url, options = {}) ⇒ Object
29 30 31 |
# File 'lib/xively-rb/client.rb', line 29 def post(url, = {}) self.class.post(url, ()) end |
#put(url, options = {}) ⇒ Object
25 26 27 |
# File 'lib/xively-rb/client.rb', line 25 def put(url, = {}) self.class.put(url, ()) end |