$app
$app : integer
$organizations : array<mixed,\duncan3dc\GitHub\OrganizationInterface>
request(string $method, string $url, array $data = array()) : \Psr\Http\Message\ResponseInterface
Send a request and return the response.
string | $method | The HTTP verb to use for the request |
string | $url | The url to issue the request to (https://api.github.com is optional) |
array | $data | The parameters to send with the request |
getAll(string $url, array $data = array(), callable $callback = null) : \Traversable|array<mixed,\stdClass>
Send a GET request and return the response.
This method will loop through all the pages until one returns no results
string | $url | The url to issue the request to |
array | $data | The parameters to send with the request |
callable | $callback | An optional handler to yield items via |
__construct(integer $app, string $key, \GuzzleHttp\ClientInterface $client = null)
Create a new instance.
integer | $app | The App ID to access the GitHub API via. |
string | $key | The app key (.pem file contents) |
\GuzzleHttp\ClientInterface | $client | The HTTP client to communicate via |
getOrganizations() : array<mixed,\duncan3dc\GitHub\OrganizationInterface>
Get all the organizations this app is installed under.
getOrganization(string $name) : \duncan3dc\GitHub\OrganizationInterface
Get an organization this app is installed under.
string | $name | The name of the organisation |