Module: TeamworkApi::API::TaskLists
- Included in:
- Client
- Defined in:
- lib/teamwork_api/api/task_lists.rb
Instance Method Summary collapse
- #create_task_list(project_id, args) ⇒ Object
- #delete_task_list(task_list_id) ⇒ Object
- #task_list(task_list_id) ⇒ Object
- #task_lists ⇒ Object
- #update_task_list(task_list_id, args) ⇒ Object
Instance Method Details
#create_task_list(project_id, args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/teamwork_api/api/task_lists.rb', line 4 def create_task_list(project_id, args) args = API.params(args) .required(:name) .optional( :private, :pinned, :'milestone-id', :description, :'todo-list-template-id', :'todo-list-template-start-date', :'todo-list-template-keep-off-weekends', :'todo-list-template-assignments' ).to_h response = post "projects/#{project_id}/tasklists.json", tasklist: args response['TASKLISTID'] end |
#delete_task_list(task_list_id) ⇒ Object
36 37 38 |
# File 'lib/teamwork_api/api/task_lists.rb', line 36 def delete_task_list(task_list_id) delete "/tasklists/#{task_list_id}.json" end |
#task_list(task_list_id) ⇒ Object
26 27 28 29 |
# File 'lib/teamwork_api/api/task_lists.rb', line 26 def task_list(task_list_id) response = get "/tasklists/#{task_list_id}.json" response.body['tasklist'] end |
#task_lists ⇒ Object
31 32 33 34 |
# File 'lib/teamwork_api/api/task_lists.rb', line 31 def task_lists response = get '/tasklists.json' response.body['tasklists'] end |
#update_task_list(task_list_id, args) ⇒ Object
23 24 |
# File 'lib/teamwork_api/api/task_lists.rb', line 23 def update_task_list(task_list_id, args) end |