View Source GitHub.Projects (GitHub REST API Client v0.3.0)
Provides API endpoints related to projects
Link to this section Summary
Functions
Add project collaborator
Create a project card
Create a project column
Create a user project
Create an organization project
Create a repository project
Delete a project
Delete a project card
Delete a project column
Get a project
Get a project card
Get a project column
Get project permission for a user
List project cards
List project collaborators
List project columns
List organization projects
List repository projects
List user projects
Move a project card
Move a project column
Remove user as a collaborator
Update a project
Update an existing project card
Update an existing project column
Link to this section Types
Link to this section Functions
@spec add_collaborator(integer(), String.t(), map() | nil, keyword()) :: :ok | {:error, GitHub.Error.t()}
Add project collaborator
Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project admin
to add a collaborator.
resources
Resources
@spec create_card(integer(), map(), keyword()) :: {:ok, GitHub.Project.Card.t()} | {:error, GitHub.Error.t()}
Create a project card
resources
Resources
@spec create_column(integer(), map(), keyword()) :: {:ok, GitHub.Project.Column.t()} | {:error, GitHub.Error.t()}
Create a project column
Creates a new project column.
resources
Resources
@spec create_for_authenticated_user( map(), keyword() ) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}
Create a user project
Creates a user project board. Returns a 410 Gone
status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
resources
Resources
@spec create_for_org(String.t(), map(), keyword()) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}
Create an organization project
Creates an organization project board. Returns a 410 Gone
status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
resources
Resources
@spec create_for_repo(String.t(), String.t(), map(), keyword()) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}
Create a repository project
Creates a repository project board. Returns a 410 Gone
status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
resources
Resources
@spec delete( integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Delete a project
Deletes a project board. Returns a 404 Not Found
status if projects are disabled.
resources
Resources
@spec delete_card( integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Delete a project card
Deletes a project card
resources
Resources
@spec delete_column( integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Delete a project column
Deletes a project column.
resources
Resources
@spec get( integer(), keyword() ) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}
Get a project
Gets a project by its id
. Returns a 404 Not Found
status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
resources
Resources
@spec get_card( integer(), keyword() ) :: {:ok, GitHub.Project.Card.t()} | {:error, GitHub.Error.t()}
Get a project card
Gets information about a project card.
resources
Resources
@spec get_column( integer(), keyword() ) :: {:ok, GitHub.Project.Column.t()} | {:error, GitHub.Error.t()}
Get a project column
Gets information about a project column.
resources
Resources
@spec get_permission_for_user(integer(), String.t(), keyword()) :: {:ok, GitHub.Project.CollaboratorPermission.t()} | {:error, GitHub.Error.t()}
Get project permission for a user
Returns the collaborator's permission level for an organization project. Possible values for the permission
key: admin
, write
, read
, none
. You must be an organization owner or a project admin
to review a user's permission level.
resources
Resources
@spec list_cards( integer(), keyword() ) :: {:ok, [GitHub.Project.Card.t()]} | {:error, GitHub.Error.t()}
List project cards
Lists the project cards in a project.
options
Options
archived_state
: Filters the project cards that are returned by the card's state.per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_collaborators( integer(), keyword() ) :: {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}
List project collaborators
Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project admin
to list collaborators.
options
Options
affiliation
: Filters the collaborators by their affiliation.outside
means outside collaborators of a project that are not a member of the project's organization.direct
means collaborators with permissions to a project, regardless of organization membership status.all
means all collaborators the authenticated user can see.per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_columns( integer(), keyword() ) :: {:ok, [GitHub.Project.Column.t()]} | {:error, GitHub.Error.t()}
List project columns
Lists the project columns in a project.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_for_org( String.t(), keyword() ) :: {:ok, [GitHub.Project.t()]} | {:error, GitHub.Error.t()}
List organization projects
Lists the projects in an organization. Returns a 404 Not Found
status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
options
Options
state
: Indicates the state of the projects to return.per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_for_repo(String.t(), String.t(), keyword()) :: {:ok, [GitHub.Project.t()]} | {:error, GitHub.Error.t()}
List repository projects
Lists the projects in a repository. Returns a 404 Not Found
status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
options
Options
state
: Indicates the state of the projects to return.per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_for_user( String.t(), keyword() ) :: {:ok, [GitHub.Project.t()]} | {:error, GitHub.Error.t()}
List user projects
Lists projects for a user.
options
Options
state
: Indicates the state of the projects to return.per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec move_card(integer(), map(), keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}
Move a project card
resources
Resources
@spec move_column(integer(), map(), keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}
Move a project column
resources
Resources
@spec remove_collaborator(integer(), String.t(), keyword()) :: :ok | {:error, GitHub.Error.t()}
Remove user as a collaborator
Removes a collaborator from an organization project. You must be an organization owner or a project admin
to remove a collaborator.
resources
Resources
@spec update(integer(), map(), keyword()) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}
Update a project
Updates a project board's information. Returns a 404 Not Found
status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
resources
Resources
@spec update_card(integer(), map(), keyword()) :: {:ok, GitHub.Project.Card.t()} | {:error, GitHub.Error.t()}
Update an existing project card
resources
Resources
@spec update_column(integer(), map(), keyword()) :: {:ok, GitHub.Project.Column.t()} | {:error, GitHub.Error.t()}
Update an existing project column