Module: Teamlab::ProjectsProjects
- Included in:
- Project
- Defined in:
- lib/teamlab/modules/projects/projects_projects.rb
Overview
Module for projects projects methods
Instance Method Summary collapse
- #create_project(title, description, responsible_id, tags, private, options = {}) ⇒ Object
- #delete_project(id) ⇒ Object
-
#delete_projects(ids) ⇒ Array
Deletes the projects with the IDs specified in the request from the portal.
- #filter_projects(options = {}) ⇒ Object
- #follow_unfollow_project(project_id) ⇒ Object
- #get_followed_projects ⇒ Object
- #get_participated_projects ⇒ Object
- #get_project(id) ⇒ Object
- #get_project_by_status(status) ⇒ Object
- #get_project_files(project_id) ⇒ Object
- #get_projects ⇒ Object
- #get_spent_time(project_id) ⇒ Object
- #search_all_projects(query) ⇒ Object
- #search_project(project_id, query) ⇒ Object
- #update_project(id, title, responsible_id, options = {}) ⇒ Object
- #update_project_status(id, status) ⇒ Object
- #update_project_tags(id, tags) ⇒ Object
Instance Method Details
#create_project(title, description, responsible_id, tags, private, options = {}) ⇒ Object
46 47 48 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 46 def create_project(title, description, responsible_id, , private, = {}) @request.post('', { title: title, description: description, responsibleid: responsible_id, tags: , private: private }.merge()) end |
#delete_project(id) ⇒ Object
66 67 68 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 66 def delete_project(id) @request.delete([id.to_s]) end |
#delete_projects(ids) ⇒ Array
Deletes the projects with the IDs specified in the request from the portal
73 74 75 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 73 def delete_projects(ids) @request.delete('', { projectids: ids }) end |
#filter_projects(options = {}) ⇒ Object
18 19 20 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 18 def filter_projects( = {}) @request.get(['filter'], ) end |
#follow_unfollow_project(project_id) ⇒ Object
62 63 64 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 62 def follow_unfollow_project(project_id) @request.put([project_id.to_s, 'follow']) end |
#get_followed_projects ⇒ Object
22 23 24 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 22 def get_followed_projects @request.get(['@follow']) end |
#get_participated_projects ⇒ Object
14 15 16 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 14 def get_participated_projects @request.get(['@self']) end |
#get_project(id) ⇒ Object
10 11 12 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 10 def get_project(id) @request.get([id.to_s]) end |
#get_project_by_status(status) ⇒ Object
26 27 28 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 26 def get_project_by_status(status) @request.get([status.to_s]) end |
#get_project_files(project_id) ⇒ Object
34 35 36 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 34 def get_project_files(project_id) @request.get([project_id.to_s, 'files']) end |
#get_projects ⇒ Object
6 7 8 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 6 def get_projects @request.get end |
#get_spent_time(project_id) ⇒ Object
30 31 32 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 30 def get_spent_time(project_id) @request.get([project_id.to_s, 'time']) end |
#search_all_projects(query) ⇒ Object
38 39 40 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 38 def search_all_projects(query) @request.get(['@search', query.to_s]) end |
#search_project(project_id, query) ⇒ Object
42 43 44 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 42 def search_project(project_id, query) @request.get([project_id.to_s, '@search', query.to_s]) end |
#update_project(id, title, responsible_id, options = {}) ⇒ Object
50 51 52 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 50 def update_project(id, title, responsible_id, = {}) @request.put([id.to_s], { title: title, responsibleId: responsible_id }.merge()) end |
#update_project_status(id, status) ⇒ Object
58 59 60 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 58 def update_project_status(id, status) @request.put([id.to_s, 'status'], status: status) end |
#update_project_tags(id, tags) ⇒ Object
54 55 56 |
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 54 def (id, ) @request.put([id.to_s, 'tag'], tags: ) end |