Module: Octokit::Client::Projects
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/projects.rb
Overview
Methods for Projects API
Instance Method Summary collapse
-
#column_cards(id, options = {}) ⇒ Array<Sawyer::Resource>
List columns cards.
-
#create_org_project(org, name, options = {}) ⇒ Sawyer::Resource
(also: #create_organization_project)
Create organization project.
-
#create_project(repo, name, options = {}) ⇒ Sawyer::Resource
Create a project.
-
#create_project_card(id, options = {}) ⇒ Sawyer::Resource
Create project card.
-
#create_project_column(id, name, options = {}) ⇒ Sawyer::Resource
Create a project column.
-
#delete_project(id, options = {}) ⇒ Boolean
Delete a project.
-
#delete_project_card(id, options = {}) ⇒ Boolean
Delete a project card.
-
#delete_project_column(id, options = {}) ⇒ Boolean
Delete a project column.
-
#move_project_card(id, position, options = {}) ⇒ Sawyer::Resource
Move a project card.
-
#move_project_column(id, position, options = {}) ⇒ Sawyer::Resource
Move a project column.
-
#org_projects(org, options = {}) ⇒ Array<Sawyer::Resource>
(also: #organization_projects)
List organization projects.
-
#project(id, options = {}) ⇒ Sawyer::Resource
Get a project by id.
-
#project_card(id, options = {}) ⇒ Sawyer::Resource
Get a project card.
-
#project_column(id, options = {}) ⇒ Sawyer::Resource
Get a project column by ID.
-
#project_columns(id, options = {}) ⇒ Array<Sawyer::Resource>
List project columns.
-
#projects(repo, options = {}) ⇒ Array<Sawyer::Resource>
List projects for a repository.
-
#update_project(id, options = {}) ⇒ Sawyer::Resource
Update a project.
-
#update_project_card(id, options = {}) ⇒ Sawyer::Resource
Update a project card.
-
#update_project_column(id, name, options = {}) ⇒ Sawyer::Resource
Update a project column.
Instance Method Details
#column_cards(id, options = {}) ⇒ Array<Sawyer::Resource>
List columns cards
Requires authenticated client
204 205 206 |
# File 'lib/octokit/client/projects.rb', line 204 def column_cards(id, = {}) paginate "projects/columns/#{id}/cards", end |
#create_org_project(org, name, options = {}) ⇒ Sawyer::Resource Also known as: create_organization_project
Create organization project
Requires authenticated client
68 69 70 71 |
# File 'lib/octokit/client/projects.rb', line 68 def create_org_project(org, name, = {}) [:name] = name post "orgs/#{org}/projects", end |
#create_project(repo, name, options = {}) ⇒ Sawyer::Resource
Create a project
Requires authenticated client
36 37 38 39 |
# File 'lib/octokit/client/projects.rb', line 36 def create_project(repo, name, = {}) [:name] = name post "#{Repository.path repo}/projects", end |
#create_project_card(id, options = {}) ⇒ Sawyer::Resource
If :note is supplied, :content_id and :content_type must be excluded. Similarly, if :content_id is supplied, :content_type must be set and :note must not be included.
Create project card
Requires authenticated client
226 227 228 |
# File 'lib/octokit/client/projects.rb', line 226 def create_project_card(id, = {}) post "projects/columns/#{id}/cards", end |
#create_project_column(id, name, options = {}) ⇒ Sawyer::Resource
Create a project column
Requires authenticated client
134 135 136 137 |
# File 'lib/octokit/client/projects.rb', line 134 def create_project_column(id, name, = {}) [:name] = name post "projects/#{id}/columns", end |
#delete_project(id, options = {}) ⇒ Boolean
Delete a project
Requires authenticated client
109 110 111 |
# File 'lib/octokit/client/projects.rb', line 109 def delete_project(id, = {}) boolean_from_response :delete, "projects/#{id}", end |
#delete_project_card(id, options = {}) ⇒ Boolean
Delete a project card
Requires authenticated client
289 290 291 |
# File 'lib/octokit/client/projects.rb', line 289 def delete_project_card(id, = {}) boolean_from_response :delete, "projects/columns/cards/#{id}", end |
#delete_project_column(id, options = {}) ⇒ Boolean
Delete a project column
Requires authenticated client
174 175 176 |
# File 'lib/octokit/client/projects.rb', line 174 def delete_project_column(id, = {}) boolean_from_response :delete, "projects/columns/#{id}", end |
#move_project_card(id, position, options = {}) ⇒ Sawyer::Resource
Move a project card
Requires authenticated client
275 276 277 278 |
# File 'lib/octokit/client/projects.rb', line 275 def move_project_card(id, position, = {}) [:position] = position post "projects/columns/cards/#{id}/moves", end |
#move_project_column(id, position, options = {}) ⇒ Sawyer::Resource
Move a project column
Requires authenticated client
190 191 192 193 |
# File 'lib/octokit/client/projects.rb', line 190 def move_project_column(id, position, = {}) [:position] = position post "projects/columns/#{id}/moves", end |
#org_projects(org, options = {}) ⇒ Array<Sawyer::Resource> Also known as: organization_projects
List organization projects
Requires authenticated client
50 51 52 |
# File 'lib/octokit/client/projects.rb', line 50 def org_projects(org, = {}) paginate "orgs/#{org}/projects", end |
#project(id, options = {}) ⇒ Sawyer::Resource
Get a project by id
81 82 83 |
# File 'lib/octokit/client/projects.rb', line 81 def project(id, = {}) get "projects/#{id}", end |
#project_card(id, options = {}) ⇒ Sawyer::Resource
Get a project card
Requires authenticated client
239 240 241 |
# File 'lib/octokit/client/projects.rb', line 239 def project_card(id, = {}) get "projects/columns/cards/#{id}", end |
#project_column(id, options = {}) ⇒ Sawyer::Resource
Get a project column by ID
146 147 148 |
# File 'lib/octokit/client/projects.rb', line 146 def project_column(id, = {}) get "projects/columns/#{id}", end |
#project_columns(id, options = {}) ⇒ Array<Sawyer::Resource>
List project columns
120 121 122 |
# File 'lib/octokit/client/projects.rb', line 120 def project_columns(id, = {}) paginate "projects/#{id}/columns", end |
#projects(repo, options = {}) ⇒ Array<Sawyer::Resource>
List projects for a repository
Requires authenticated client
18 19 20 |
# File 'lib/octokit/client/projects.rb', line 18 def projects(repo, = {}) paginate "#{Repository.path repo}/projects", end |
#update_project(id, options = {}) ⇒ Sawyer::Resource
Update a project
Requires authenticated client
96 97 98 |
# File 'lib/octokit/client/projects.rb', line 96 def update_project(id, = {}) patch "projects/#{id}", end |
#update_project_card(id, options = {}) ⇒ Sawyer::Resource
Update a project card
Requires authenticated client
255 256 257 |
# File 'lib/octokit/client/projects.rb', line 255 def update_project_card(id, = {}) patch "projects/columns/cards/#{id}", end |
#update_project_column(id, name, options = {}) ⇒ Sawyer::Resource
Update a project column
Requires authenticated client
160 161 162 163 |
# File 'lib/octokit/client/projects.rb', line 160 def update_project_column(id, name, = {}) [:name] = name patch "projects/columns/#{id}", end |