Class Github\Api\Deployment

InheritanceGithub\Api\Deployment » Github\Api\AbstractApi
ImplementsGithub\Api\ApiInterface

Listing, creating and updating deployments.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Github\Api\AbstractApi
all() List deployments for a particular repository Github\Api\Deployment
configure() Github\Api\AbstractApi
create() Create a new deployment for the given username and repo. Github\Api\Deployment
getPerPage() Github\Api\AbstractApi
getStatuses() Gets all of the status updates tied to a given deployment. Github\Api\Deployment
setPerPage() Github\Api\AbstractApi
updateStatus() Updates a deployment by creating a new status update. Github\Api\Deployment

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createJsonBody() Create a JSON encoded version of an array of parameters. Github\Api\AbstractApi
delete() Send a DELETE request with JSON-encoded parameters. Github\Api\AbstractApi
get() Send a GET request with query parameters. Github\Api\AbstractApi
head() Send a HEAD request with query parameters. Github\Api\AbstractApi
patch() Send a PATCH request with JSON-encoded parameters. Github\Api\AbstractApi
post() Send a POST request with JSON-encoded parameters. Github\Api\AbstractApi
postRaw() Send a POST request with raw data. Github\Api\AbstractApi
put() Send a PUT request with JSON-encoded parameters. Github\Api\AbstractApi

Method Details

all() public method

List deployments for a particular repository

public array all ( $username, $repository, array $params = [] )
$username string

The username of the user who owns the repository

$repository string

The name of the repository

$params array

Query parameters to filter deployments by (see link)

return array

The deployments requested

create() public method

Create a new deployment for the given username and repo.

See also updateStatus().

public array create ( $username, $repository, array $params )
$username string

The username

$repository string

The repository

$params array

The new deployment data

return array

Information about the deployment

throws Github\Exception\MissingArgumentException
getStatuses() public method

Gets all of the status updates tied to a given deployment.

public array getStatuses ( $username, $repository, $id )
$username string

The username

$repository string

The repository

$id int

The deployment identifier

return array

The deployment statuses

updateStatus() public method

Updates a deployment by creating a new status update.

public array updateStatus ( $username, $repository, $id, array $params )
$username string

The username

$repository string

The repository

$id string

The deployment number

$params array

The information about the deployment update.

                  Must include a "state" field of pending, success, error, or failure.
                  May also be given a target_url and description, ├čee link for more details.
return array

Information about the deployment

throws Github\Exception\MissingArgumentException