Class: IMHR::API
- Inherits:
-
Object
- Object
- IMHR::API
- Defined in:
- lib/imhr/api.rb
Class Method Summary collapse
- .create(path, params) ⇒ Object
- .delete(path) ⇒ Object
- .get(path, params) ⇒ Object
- .update(path, params) ⇒ Object
Class Method Details
.create(path, params) ⇒ Object
8 9 10 |
# File 'lib/imhr/api.rb', line 8 def create(path, params) access_token.post(api_path(path), body: params) end |
.delete(path) ⇒ Object
16 17 18 |
# File 'lib/imhr/api.rb', line 16 def delete(path) access_token.patch(path) end |
.get(path, params) ⇒ Object
4 5 6 |
# File 'lib/imhr/api.rb', line 4 def get(path, params) access_token.get(api_path(path), params: params) end |
.update(path, params) ⇒ Object
12 13 14 |
# File 'lib/imhr/api.rb', line 12 def update(path, params) access_token.patch(api_path(path), body: params) end |