| 1 | <?php |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Extended GitHub API Repositories class. |
||
| 16 | * |
||
| 17 | * @since 1.0 |
||
| 18 | */ |
||
| 19 | class Repositories extends BaseRepositories |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * API Response object |
||
| 23 | * |
||
| 24 | * @var Response |
||
| 25 | * @since 1.0 |
||
| 26 | */ |
||
| 27 | private $apiResponse; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the last API response if one is set |
||
| 31 | * |
||
| 32 | * @return Response|null |
||
| 33 | * |
||
| 34 | * @since 1.0 |
||
| 35 | */ |
||
| 36 | public function getApiResponse() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get a list of tags on a repository. |
||
| 43 | * |
||
| 44 | * Note: This is different from the parent `getListTags` method as it adds support for the API's pagination. This extended method can be removed |
||
| 45 | * if the upstream class gains this support. |
||
| 46 | * |
||
| 47 | * @param string $owner Repository owner. |
||
| 48 | * @param string $repo Repository name. |
||
| 49 | * @param integer $page The page number from which to get items. |
||
| 50 | * |
||
| 51 | * @return object |
||
| 52 | * |
||
| 53 | * @since 1.0 |
||
| 54 | */ |
||
| 55 | public function getTags($owner, $repo, $page = 0) |
||
| 56 | { |
||
| 57 | // Build the request path. |
||
| 58 | $path = '/repos/' . $owner . '/' . $repo . '/tags'; |
||
| 59 | |||
| 60 | // Send the request. |
||
| 66 |