Module: Worksection::Client::GettingData
- Included in:
- Worksection::Client
- Defined in:
- lib/worksection/modules/getting_data.rb
Instance Method Summary collapse
- #get_all_tasks(**args) ⇒ Object
- #get_comments(project_id, task_id) ⇒ Object
- #get_priority(**args) ⇒ Object
- #get_projects(**args) ⇒ Object
- #get_task(project_id, task_id, **args) ⇒ Object
- #get_tasks(project_id, **args) ⇒ Object
- #get_timemoney(**args) ⇒ Object
- #get_users ⇒ Object
Instance Method Details
#get_all_tasks(**args) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/worksection/modules/getting_data.rb', line 13 def get_all_tasks(**args) url = URI("https://#{@domain}/api/admin/?action=get_all_tasks"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s)}") perform_request(url) end |
#get_comments(project_id, task_id) ⇒ Object
56 57 58 59 60 61 |
# File 'lib/worksection/modules/getting_data.rb', line 56 def get_comments(project_id, task_id) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=get_comments&page=#{page}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#get_priority(**args) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/worksection/modules/getting_data.rb', line 21 def get_priority(**args) url = URI("https://#{@domain}/api/admin/?action=get_priority"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s)}") perform_request(url) end |
#get_projects(**args) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/worksection/modules/getting_data.rb', line 4 def get_projects(**args) url = URI("https://#{@domain}/api/admin/?action=get_projects"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s)}") puts url perform_request(url) end |
#get_task(project_id, task_id, **args) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/worksection/modules/getting_data.rb', line 29 def get_task(project_id, task_id, **args) page = "/project/#{project_id}/#{task_id}/" url = URI("https://#{@domain}/api/admin/?action=get_task&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#get_tasks(project_id, **args) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/worksection/modules/getting_data.rb', line 38 def get_tasks(project_id, **args) page = "/project/#{project_id}" url = URI("https://#{@domain}/api/admin/?action=get_tasks&page=#{page}"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s, page)}") perform_request(url) end |
#get_timemoney(**args) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/worksection/modules/getting_data.rb', line 47 def get_timemoney(**args) url = URI("https://#{@domain}/api/admin/?action=get_timemoney"\ "#{collect_params(**args)}"\ "&hash=#{to_md5(__method__.to_s)}") puts url perform_request(url) end |
#get_users ⇒ Object
64 65 66 67 68 |
# File 'lib/worksection/modules/getting_data.rb', line 64 def get_users url = URI("https://#{@domain}/api/admin/?action=get_users"\ "&hash=#{to_md5(__method__.to_s)}") perform_request(url) end |