| @@ 233-246 (lines=14) @@ | ||
| 230 | * @since 1.0 |
|
| 231 | * @throws \DomainException |
|
| 232 | */ |
|
| 233 | public function getList($user, $repo, $state = 'open', $page = 0, $limit = 0) |
|
| 234 | { |
|
| 235 | // Build the request path. |
|
| 236 | $path = '/repos/' . $user . '/' . $repo . '/pulls'; |
|
| 237 | ||
| 238 | // If a state exists append it as an option. |
|
| 239 | if ($state != 'open') |
|
| 240 | { |
|
| 241 | $path .= '?state=' . $state; |
|
| 242 | } |
|
| 243 | ||
| 244 | // Send the request. |
|
| 245 | return $this->processResponse($this->client->get($this->fetchUrl($path, $page, $limit))); |
|
| 246 | } |
|
| 247 | ||
| 248 | /** |
|
| 249 | * Get if a pull request has been merged. |
|
| @@ 69-81 (lines=13) @@ | ||
| 66 | * @since 1.0 |
|
| 67 | * @deprecated The legacy API is deprecated |
|
| 68 | */ |
|
| 69 | public function repositories($keyword, $language = '', $start_page = 0) |
|
| 70 | { |
|
| 71 | // Build the request path. |
|
| 72 | $path = '/legacy/repos/search/' . $keyword . '?'; |
|
| 73 | ||
| 74 | $path .= ($language) ? '&language=' . $language : ''; |
|
| 75 | $path .= ($start_page) ? '&start_page=' . $start_page : ''; |
|
| 76 | ||
| 77 | // Send the request. |
|
| 78 | return $this->processResponse( |
|
| 79 | $this->client->get($this->fetchUrl($path)) |
|
| 80 | ); |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * Search users. |
|