Class: Dailymile::Connection
- Inherits:
-
Object
- Object
- Dailymile::Connection
- Defined in:
- lib/dailymile/connection.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Token
Constant Summary collapse
- DEFAULT_FORMAT =
:json
- DEFAULT_HEADERS =
{ 'Accept' => 'application/json', 'User-Agent' => "dailymile-ruby/#{Dailymile::VERSION}" }
Instance Method Summary collapse
- #delete(path) ⇒ Object
- #get(path, params = {}) ⇒ Object
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Instance Method Details
#delete(path) ⇒ Object
23 24 25 |
# File 'lib/dailymile/connection.rb', line 23 def delete(path) request :delete, path end |
#get(path, params = {}) ⇒ Object
11 12 13 |
# File 'lib/dailymile/connection.rb', line 11 def get(path, params = {}) request :get, path, params end |
#post(path, params = {}) ⇒ Object
15 16 17 |
# File 'lib/dailymile/connection.rb', line 15 def post(path, params = {}) request :post, path, params end |
#put(path, params = {}) ⇒ Object
19 20 21 |
# File 'lib/dailymile/connection.rb', line 19 def put(path, params = {}) request :put, path, params end |