module Gitlab::Client::Boards

def board(project, id)

Returns:
  • (Gitlab::ObjectifiedHash) - Returns information about the board

Parameters:
  • id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def board(project, id)
  get("/projects/#{url_encode project}/boards/#{id}")
end

def board_list(project, board_id, id)

Returns:
  • (Gitlab::ObjectifiedHash) -

Parameters:
  • id (Integer) -- The ID of a list.
  • board_id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def board_list(project, board_id, id)
  get("/projects/#{url_encode project}/boards/#{board_id}/lists/#{id}")
end

def board_lists(project, id)

Returns:
  • (Gitlab::ObjectifiedHash) -

Parameters:
  • id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def board_lists(project, id)
  get("/projects/#{url_encode project}/boards/#{id}/lists")
end

def boards(project, options = {})

Returns:
  • (Array) -

Options Hash: (**options)
  • :per_page (Integer) -- The number of results per page.
  • :page (Integer) -- The page number.

Parameters:
  • options (Hash) -- A customizable set of options.
  • project (Integer, String) -- The ID or name of a project.
def boards(project, options = {})
  get("/projects/#{url_encode project}/boards", query: options)
end

def create_board(project, name)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about created board.

Parameters:
  • name (String) -- The name of the new board.
  • project (Integer, String) -- The ID or name of a project.
def create_board(project, name)
  body = { name: name }
  post("/projects/#{url_encode project}/boards", body: body)
end

def create_board_list(project, board_id, label_id)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about created list.

Parameters:
  • label_id (Integer) -- The ID of a label.
  • id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def create_board_list(project, board_id, label_id)
  post("/projects/#{url_encode project}/boards/#{board_id}/lists", body: { label_id: label_id })
end

def delete_board(project, id)

Returns:
  • (void) - This API call returns an empty response body.

Parameters:
  • id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def delete_board(project, id)
  delete("/projects/#{url_encode project}/boards/#{id}")
end

def delete_board_list(project, board_id, id)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about deleted board list.

Parameters:
  • id (Integer) -- The ID of a list.
  • board_id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def delete_board_list(project, board_id, id)
  delete("/projects/#{url_encode project}/boards/#{board_id}/lists/#{id}")
end

def edit_board(project, id, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about updated board.

Options Hash: (**options)
  • :weight(optional) (Integer) -- The weight range from 0 to 9, to which the board should be scoped to.
  • :labels(optional) (String) -- Comma-separated list of label names which the board should be scoped to.
  • :milestone_id(optional) (Integer) -- The milestone the board should be scoped to.
  • :assignee_id(optional) (Integer) -- The assignee the board should be scoped to.
  • :name(optional) (String) -- The new name of the board.

Parameters:
  • options (Hash) -- A customizable set of options.
  • id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def edit_board(project, id, options = {})
  put("/projects/#{url_encode project}/boards/#{id}", body: options)
end

def edit_board_list(project, board_id, id, position)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about updated board list.

Parameters:
  • id (Integer) -- The ID of a list.
  • board_id (Integer) -- The ID of a board.
  • project (Integer, String) -- The ID or name of a project.
def edit_board_list(project, board_id, id, position)
  put("/projects/#{url_encode project}/boards/#{board_id}/lists/#{id}", body: { position: position })
end