Class: Youtrack::Project
Instance Attribute Summary
Attributes inherited from Base
#base_url, #response, #service
Instance Method Summary collapse
-
#all ⇒ Object
ADMIN Methods ==================.
-
#create(attributes = {}) ⇒ Object
required attributes.
- #destroy(project_id) ⇒ Object
- #find(project_id) ⇒ Object
-
#get_accessible_projects ⇒ Object
USER Methods ==================.
-
#get_issues_for(project_id, options = {}) ⇒ Object
filter string Apply a filter to issues in a project.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Youtrack::Base
Instance Method Details
#all ⇒ Object
ADMIN Methods
25 26 27 28 |
# File 'lib/youtrack/resources/project.rb', line 25 def all get('admin/project') response.parsed_response end |
#create(attributes = {}) ⇒ Object
required attributes
projectId string required Unique identifier of a project to be created. This short name will be used as prefix in issue IDs for this project. projectName string required Full name of a new project. Must be unique. startingNumber integer required Number to assign to the next manually created issue. projectLeadLogin string required Login name of a user to be assigned as a project leader. description string Optional description of the new project
42 43 44 45 |
# File 'lib/youtrack/resources/project.rb', line 42 def create(attributes={}) put("admin/project/#{attributes[:projectId]}", body: attributes) response end |
#destroy(project_id) ⇒ Object
47 48 49 50 |
# File 'lib/youtrack/resources/project.rb', line 47 def destroy(project_id) delete("admin/project/#{project_id}") response end |
#find(project_id) ⇒ Object
30 31 32 33 |
# File 'lib/youtrack/resources/project.rb', line 30 def find(project_id) get("admin/project/#{project_id}") response.parsed_response end |
#get_accessible_projects ⇒ Object
USER Methods
7 8 9 10 |
# File 'lib/youtrack/resources/project.rb', line 7 def get_accessible_projects get('project/all') response.parsed_response end |
#get_issues_for(project_id, options = {}) ⇒ Object
filter string Apply a filter to issues in a project. after Integer A number of issues to skip before getting a list of issues. That is, when you specify, for example, after=12 in request,
then in the response you will get all issues matching request but without first twelve issues found .
max Integer Maximum number of issues to be imported. If not provided, 10 issues will be imported, by default. updatedAfter Long Filter issues by the date of the most recent update. Only issues imported after the specified date will be gotten.
17 18 19 20 |
# File 'lib/youtrack/resources/project.rb', line 17 def get_issues_for(project_id, ={}) get("issue/byproject/#{project_id}") response.parsed_response end |