class Github::Client::Projects::Columns
Constants
- REQUIRED_COLUMN_PARAMS
- REQUIRED_MOVE_COLUMN_PARAMS
Public Instance Methods
Create a project column
@param [Hash] params @option params [String] :name
Required. The name of the column.
@example
github = Github.new github.projects.columns.create :project_id, name: 'column-name'
@see developer.github.com/v3/projects/columns/#create-a-project-column
@api public
# File lib/github_api/client/projects/columns.rb, line 65 def create(*args) arguments(args, required: [:project_id]) do assert_required REQUIRED_COLUMN_PARAMS end params = arguments.params params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA post_request("/projects/#{arguments.project_id}/columns", params) end
Delete a project column
@example
github = Github.new github.projects.columns.delete :column_id
@see developer.github.com/v3/projects/columns/#delete-a-project-column
@api public
# File lib/github_api/client/projects/columns.rb, line 110 def delete(*args) arguments(args, required: [:column_id]) params = arguments.params params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA delete_request("/projects/columns/#{arguments.column_id}", params) end
Get a project columns
@example
github = Github.new github.projects.columns.get :column_id
@see developer.github.com/v3/projects/columns/#get-a-project-column
@api public
# File lib/github_api/client/projects/columns.rb, line 42 def get(*args) arguments(args, required: [:column_id]) params = arguments.params params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA get_request("/projects/columns/#{arguments.column_id}", params) end
List a project's columns
@example
github = Github.new github.projects.columns.list :project_id
@see developer.github.com/v3/projects/columns/#list-project-columns
@api public
# File lib/github_api/client/projects/columns.rb, line 20 def list(*args) arguments(args, required: [:project_id]) params = arguments.params params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA response = get_request("/projects/#{arguments.project_id}/columns", params) return response unless block_given? response.each { |el| yield el } end
Move a project column
@param [Hash] params @option params [String] :position
Required. Required. Can be one of 'first', 'last', or 'after:<column-id>', where <column-id> is the id value of a column in the same project.
@example
github = Github.new github.projects.columns.move :column_id, position: 'first'
@see developer.github.com/v3/projects/columns/#move-a-project-column
@api public
# File lib/github_api/client/projects/columns.rb, line 135 def move(*args) arguments(args, required: [:column_id]) do assert_required REQUIRED_MOVE_COLUMN_PARAMS end params = arguments.params params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA post_request("/projects/columns/#{arguments.column_id}/moves", params) end
Update a project column
@param [Hash] params @option params [String] :name
Required. The name of the column.
@example
github = Github.new github.repos.projects.update :column_id, name: 'new-column-name'
@see developer.github.com/v3/projects/columns/#update-a-project-column
@api public
# File lib/github_api/client/projects/columns.rb, line 89 def update(*args) arguments(args, required: [:column_id]) do assert_required REQUIRED_COLUMN_PARAMS end params = arguments.params params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA patch_request("/projects/columns/#{arguments.column_id}", params) end