Class Github\Api\Repository\Assets

InheritanceGithub\Api\Repository\Assets » Github\Api\AbstractApi
ImplementsGithub\Api\ApiInterface

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Github\Api\AbstractApi
all() Get all release's assets in selected repository GET /repos/:owner/:repo/releases/:id/assets. Github\Api\Repository\Assets
configure() Github\Api\AbstractApi
create() Create an asset for selected repository's release POST /repos/:owner/:repo/releases/:id/assets?name=:filename. Github\Api\Repository\Assets
edit() Edit an asset in selected repository's release PATCH /repos/:owner/:repo/releases/assets/:id. Github\Api\Repository\Assets
getPerPage() Github\Api\AbstractApi
remove() Delete an asset in selected repository's release DELETE /repos/:owner/:repo/releases/assets/:id. Github\Api\Repository\Assets
setPerPage() Github\Api\AbstractApi
show() Get an asset in selected repository's release GET /repos/:owner/:repo/releases/assets/:id. Github\Api\Repository\Assets

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

Get all release's assets in selected repository GET /repos/:owner/:repo/releases/:id/assets.

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

The user who owns the repo

$repository string

The name of the repo

$id int

The id of the release

create() public method

Create an asset for selected repository's release POST /repos/:owner/:repo/releases/:id/assets?name=:filename.

Creating an asset requires support for server name indentification (SNI) so this must be supported by your PHP version.

See also:

public array create ( $username, $repository, $id, $name, $contentType, $content )
$username string

The user who owns the repo

$repository string

The name of the repo

$id int

The id of the release

$name string

The filename for the asset

$contentType string

The content type for the asset

$content string

The content of the asset

throws Github\Exception\MissingArgumentException
throws Github\Exception\ErrorException
edit() public method

Edit an asset in selected repository's release PATCH /repos/:owner/:repo/releases/assets/:id.

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

The user who owns the repo

$repository string

The name of the repo

$id int

The id of the asset

$params array

Request parameters

throws Github\Exception\MissingArgumentException
remove() public method

Delete an asset in selected repository's release DELETE /repos/:owner/:repo/releases/assets/:id.

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

The user who owns the repo

$repository string

The name of the repo

$id int

The id of the asset

show() public method

Get an asset in selected repository's release GET /repos/:owner/:repo/releases/assets/:id.

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

The user who owns the repo

$repository string

The name of the repo

$id int

The id of the asset