$api
$api : \duncan3dc\GitHub\ApiInterface
$api : \duncan3dc\GitHub\ApiInterface
$tree : \duncan3dc\GitHub\TreeInterface|null
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 |
fromApiResponse(\stdClass $data, \duncan3dc\GitHub\ApiInterface $api) : \duncan3dc\GitHub\BranchInterface
Create a new instance from an API request for the full branch data.
| \stdClass | $data | The branch's data from the GitHub Api |
| \duncan3dc\GitHub\ApiInterface | $api | The Api instance to communicate with GitHub |
fromListResponse(\stdClass $data, string $url, \duncan3dc\GitHub\ApiInterface $api) : \duncan3dc\GitHub\BranchInterface
Create a new instance from an API request for a list of branches.
| \stdClass | $data | The branch's basic data from the GitHub Api |
| string | $url | The endpoint to get the full branch data from |
| \duncan3dc\GitHub\ApiInterface | $api | The Api instance to communicate with GitHub |
__construct(\stdClass $data, \duncan3dc\GitHub\ApiInterface $api)
Create a new instance.
| \stdClass | $data | The branch's data from the GitHub Api |
| \duncan3dc\GitHub\ApiInterface | $api | The Api instance to communicate with GitHub |
getTree() : \duncan3dc\GitHub\TreeInterface
Get a Tree instance that represents the root of the branch.