Module: Gitlab::Client::Boards
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/boards.rb
Overview
Defines methods related to issue boards.
Instance Method Summary collapse
-
#board(project, id) ⇒ Gitlab::ObjectifiedHash
Get a single board.
-
#board_list(project, board_id, id) ⇒ Gitlab::ObjectifiedHash
Gets a single board list.
-
#board_lists(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a board lists.
-
#boards(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project’s boards.
-
#create_board(project, name) ⇒ Gitlab::ObjectifiedHash
Creates a new board.
-
#create_board_list(project, board_id, label_id) ⇒ Gitlab::ObjectifiedHash
Creates a new board list.
-
#delete_board(project, id) ⇒ void
Deletes a board.
-
#delete_board_list(project, board_id, id) ⇒ Gitlab::ObjectifiedHash
Deletes a board list.
-
#edit_board(project, id, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a board.
-
#edit_board_list(project, board_id, id, position) ⇒ Gitlab::ObjectifiedHash
Updates a board list.
Instance Method Details
#board(project, id) ⇒ Gitlab::ObjectifiedHash
Get a single board.
30 31 32 |
# File 'lib/gitlab/client/boards.rb', line 30 def board(project, id) get("/projects/#{url_encode project}/boards/#{id}") end |
#board_list(project, board_id, id) ⇒ Gitlab::ObjectifiedHash
Gets a single board list
100 101 102 |
# File 'lib/gitlab/client/boards.rb', line 100 def board_list(project, board_id, id) get("/projects/#{url_encode project}/boards/#{board_id}/lists/#{id}") end |
#board_lists(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a board lists
86 87 88 |
# File 'lib/gitlab/client/boards.rb', line 86 def board_lists(project, id) get("/projects/#{url_encode project}/boards/#{id}/lists") end |
#boards(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project’s boards.
18 19 20 |
# File 'lib/gitlab/client/boards.rb', line 18 def boards(project, = {}) get("/projects/#{url_encode project}/boards", query: ) end |
#create_board(project, name) ⇒ Gitlab::ObjectifiedHash
Creates a new board.
42 43 44 45 |
# File 'lib/gitlab/client/boards.rb', line 42 def create_board(project, name) body = { name: name } post("/projects/#{url_encode project}/boards", body: body) end |
#create_board_list(project, board_id, label_id) ⇒ Gitlab::ObjectifiedHash
Creates a new board list. Only for admins and project owners
114 115 116 |
# File 'lib/gitlab/client/boards.rb', line 114 def create_board_list(project, board_id, label_id) post("/projects/#{url_encode project}/boards/#{board_id}/lists", body: { label_id: label_id }) end |
#delete_board(project, id) ⇒ void
This method returns an undefined value.
Deletes a board.
74 75 76 |
# File 'lib/gitlab/client/boards.rb', line 74 def delete_board(project, id) delete("/projects/#{url_encode project}/boards/#{id}") end |
#delete_board_list(project, board_id, id) ⇒ Gitlab::ObjectifiedHash
Deletes a board list. Only for admins and project owners
142 143 144 |
# File 'lib/gitlab/client/boards.rb', line 142 def delete_board_list(project, board_id, id) delete("/projects/#{url_encode project}/boards/#{board_id}/lists/#{id}") end |
#edit_board(project, id, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a board.
62 63 64 |
# File 'lib/gitlab/client/boards.rb', line 62 def edit_board(project, id, = {}) put("/projects/#{url_encode project}/boards/#{id}", body: ) end |
#edit_board_list(project, board_id, id, position) ⇒ Gitlab::ObjectifiedHash
Updates a board list. Only for admins and project owners
128 129 130 |
# File 'lib/gitlab/client/boards.rb', line 128 def edit_board_list(project, board_id, id, position) put("/projects/#{url_encode project}/boards/#{board_id}/lists/#{id}", body: { position: position }) end |