Abstract Class Github\Api\AbstractApi

InheritanceGithub\Api\AbstractApi
ImplementsGithub\Api\ApiInterface
SubclassesGithub\Api\Authorizations, Github\Api\CurrentUser, Github\Api\CurrentUser\DeployKeys, Github\Api\CurrentUser\Emails, Github\Api\CurrentUser\Followers, Github\Api\CurrentUser\Memberships, Github\Api\CurrentUser\Notifications, Github\Api\CurrentUser\Starring, Github\Api\CurrentUser\Watchers, Github\Api\Deployment, Github\Api\Enterprise, Github\Api\Enterprise\License, Github\Api\Enterprise\ManagementConsole, Github\Api\Enterprise\Stats, Github\Api\Enterprise\UserAdmin, Github\Api\Gist\Comments, Github\Api\Gists, Github\Api\GitData, Github\Api\GitData\Blobs, Github\Api\GitData\Commits, Github\Api\GitData\References, Github\Api\GitData\Tags, Github\Api\GitData\Trees, Github\Api\Issue, Github\Api\Issue\Comments, Github\Api\Issue\Events, Github\Api\Issue\Labels, Github\Api\Issue\Milestones, Github\Api\Markdown, Github\Api\Meta, Github\Api\Notification, Github\Api\Organization, Github\Api\Organization\Hooks, Github\Api\Organization\Members, Github\Api\Organization\Teams, Github\Api\PullRequest, Github\Api\PullRequest\Comments, Github\Api\RateLimit, Github\Api\Repo, Github\Api\Repository\Assets, Github\Api\Repository\Collaborators, Github\Api\Repository\Comments, Github\Api\Repository\Commits, Github\Api\Repository\Contents, Github\Api\Repository\DeployKeys, Github\Api\Repository\Downloads, Github\Api\Repository\Forks, Github\Api\Repository\Hooks, Github\Api\Repository\Labels, Github\Api\Repository\Releases, Github\Api\Repository\Statuses, Github\Api\Search, Github\Api\User

Abstract class for Api classes.

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

Property Details

$client protected property
protected Github\Client $client null
$perPage protected property
protected null|int $perPage null

Method Details

__construct() public method

public void __construct ( Github\Client $client )
$client Github\Client
configure() public method

public void configure ( )
createJsonBody() protected method

Create a JSON encoded version of an array of parameters.

protected null|string createJsonBody ( array $parameters )
$parameters array

Request parameters

delete() protected method

Send a DELETE request with JSON-encoded parameters.

protected void delete ( $path, array $parameters = [], $requestHeaders = [] )
$path string

Request path.

$parameters array

POST parameters to be JSON encoded.

$requestHeaders array

Request headers.

get() protected method

Send a GET request with query parameters.

protected Guzzle\Http\EntityBodyInterface|mixed|string get ( $path, array $parameters = [], $requestHeaders = [] )
$path string

Request path.

$parameters array

GET parameters.

$requestHeaders array

Request Headers.

getPerPage() public method

public null|int getPerPage ( )
head() protected method

Send a HEAD request with query parameters.

protected Guzzle\Http\Message\Response head ( $path, array $parameters = [], $requestHeaders = [] )
$path string

Request path.

$parameters array

HEAD parameters.

$requestHeaders array

Request headers.

patch() protected method

Send a PATCH request with JSON-encoded parameters.

protected void patch ( $path, array $parameters = [], $requestHeaders = [] )
$path string

Request path.

$parameters array

POST parameters to be JSON encoded.

$requestHeaders array

Request headers.

post() protected method

Send a POST request with JSON-encoded parameters.

protected void post ( $path, array $parameters = [], $requestHeaders = [] )
$path string

Request path.

$parameters array

POST parameters to be JSON encoded.

$requestHeaders array

Request headers.

postRaw() protected method

Send a POST request with raw data.

protected Guzzle\Http\EntityBodyInterface|mixed|string postRaw ( $path, $body, $requestHeaders = [] )
$path string

Request path.

$body

Request body.

$requestHeaders array

Request headers.

put() protected method

Send a PUT request with JSON-encoded parameters.

protected void put ( $path, array $parameters = [], $requestHeaders = [] )
$path string

Request path.

$parameters array

POST parameters to be JSON encoded.

$requestHeaders array

Request headers.

setPerPage() public method

public void setPerPage ( $perPage )
$perPage null|int