Class: Height::API::Tasks
- Inherits:
-
Object
- Object
- Height::API::Tasks
- Defined in:
- lib/height/api/tasks.rb
Class Method Summary collapse
- .get(id_or_index) ⇒ Object
- .search(filter, incl = nil) ⇒ Object
- .update_task(id_or_index, data) ⇒ Object
Class Method Details
.get(id_or_index) ⇒ Object
13 14 15 16 17 |
# File 'lib/height/api/tasks.rb', line 13 def get(id_or_index) res = Height::Request.get("tasks/#{id_or_index}") Height::Response.parse(res.body) end |
.search(filter, incl = nil) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/height/api/tasks.rb', line 3 def search(filter, incl = nil) query = { 'filters' => filter.to_json } query.merge!({ 'include' => incl.to_json }) if incl res = Height::Request.get('tasks', query) Height::ListResponse.parse(res.body) end |