Module: Worksection::Client::Editing
- Included in:
- Worksection::Client
- Defined in:
- lib/worksection/modules/editing.rb
Instance Method Summary collapse
- #activate_project(project_id) ⇒ Object
- #close_project(project_id) ⇒ Object
- #complete_subtask(project_id, task_id, subtask_id) ⇒ Object
- #complete_task(project_id, task_id) ⇒ Object
- #delete_timemoney(project_id, task_id, **args) ⇒ Object
- #reopen_subtask(project_id, task_id, subtask_id) ⇒ Object
- #reopen_task(project_id, task_id) ⇒ Object
- #subscribe(project_id, task_id, **args) ⇒ Object
- #unsubscribe(project_id, task_id, **args) ⇒ Object
- #update_project(project_id, **args) ⇒ Object
- #update_subtask(project_id, task_id, subtask_id, **args) ⇒ Object
- #update_tags(project_id, task_id, **args) ⇒ Object
- #update_task(project_id, task_id, **args) ⇒ Object
- #update_timemoney(project_id, task_id, subtask_id = nil, **args) ⇒ Object
Instance Method Details
#activate_project(project_id) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/worksection/modules/editing.rb', line 13 def activate_project(project_id) page = "/project/#{project_id}/" url = URI("https://#{@domain}/api/admin/?action=activate_project&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#close_project(project_id) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/worksection/modules/editing.rb', line 5 def close_project(project_id) page = "/project/#{project_id}/" url = URI("https://#{@domain}/api/admin/?action=close_project&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#complete_subtask(project_id, task_id, subtask_id) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/worksection/modules/editing.rb', line 29 def complete_subtask(project_id, task_id, subtask_id) page = "/project/#{project_id}/#{task_id}/#{subtask_id}/" url = URI("https://#{@domain}/api/admin/?action=complete_subtask&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#complete_task(project_id, task_id) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/worksection/modules/editing.rb', line 21 def complete_task(project_id, task_id) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=complete_task&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#delete_timemoney(project_id, task_id, **args) ⇒ Object
89 90 91 92 93 94 95 |
# File 'lib/worksection/modules/editing.rb', line 89 def delete_timemoney(project_id, task_id, **args) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=delete_timemoney&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#reopen_subtask(project_id, task_id, subtask_id) ⇒ Object
45 46 47 48 49 50 |
# File 'lib/worksection/modules/editing.rb', line 45 def reopen_subtask(project_id, task_id, subtask_id) page = "/project/#{project_id}/#{task_id}/#{subtask_id}/" url = URI("https://#{@domain}/api/admin/?action=reopen_subtask&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#reopen_task(project_id, task_id) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/worksection/modules/editing.rb', line 37 def reopen_task(project_id, task_id) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=reopen_task&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#subscribe(project_id, task_id, **args) ⇒ Object
98 99 100 101 102 103 104 |
# File 'lib/worksection/modules/editing.rb', line 98 def subscribe(project_id, task_id, **args) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=subscribe&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#unsubscribe(project_id, task_id, **args) ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/worksection/modules/editing.rb', line 107 def unsubscribe(project_id, task_id, **args) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=unsubscribe&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#update_project(project_id, **args) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/worksection/modules/editing.rb', line 54 def update_project(project_id, **args) page = "/project=#{project_id}/" url = URI("https://#{@domain}/api/admin/?action=update_project&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#update_subtask(project_id, task_id, subtask_id, **args) ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/worksection/modules/editing.rb', line 71 def update_subtask(project_id, task_id, subtask_id, **args) page = "/project/#{project_id}/#{task_id}/#{subtask_id}/" url = URI("https://#{@domain}/api/admin/?action=update_subtask&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#update_tags(project_id, task_id, **args) ⇒ Object
116 117 118 119 120 121 122 |
# File 'lib/worksection/modules/editing.rb', line 116 def (project_id, task_id, **args) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=update_tags&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#update_task(project_id, task_id, **args) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/worksection/modules/editing.rb', line 63 def update_task(project_id, task_id, **args) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=update_task&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#update_timemoney(project_id, task_id, subtask_id = nil, **args) ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/worksection/modules/editing.rb', line 80 def update_timemoney(project_id, task_id, subtask_id = nil, **args) page = "/project/#{project_id}/#{task_id}/#{subtask_id}/".gsub('//','/') url = URI("https://#{@domain}/api/admin/?action=update_timemoney&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |