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

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, tags, private, options = {})
  @request.post('', { title: title, description: description, responsibleid: responsible_id, tags: tags, private: private }.merge(options))
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

Parameters:

  • ids (Array)

    List of project IDs

Returns:

  • (Array)

    Deleted projects



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(options = {})
  @request.get(['filter'], options)
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_projectsObject



22
23
24
# File 'lib/teamlab/modules/projects/projects_projects.rb', line 22

def get_followed_projects
  @request.get(['@follow'])
end

#get_participated_projectsObject



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_projectsObject



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, options = {})
  @request.put([id.to_s], { title: title, responsibleId: responsible_id }.merge(options))
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 update_project_tags(id, tags)
  @request.put([id.to_s, 'tag'], tags: tags)
end