| Total Complexity | 9 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 10 | class GetImages extends AbstractApiMethod |
||
| 11 | { |
||
| 12 | protected $resultsPerPage = 10; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * GetImages constructor. |
||
| 16 | * @param int $resultsPerPage |
||
| 17 | */ |
||
| 18 | public function __construct($resultsPerPage) |
||
| 19 | { |
||
| 20 | $this->resultsPerPage = $resultsPerPage; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getHeaders() |
||
| 24 | { |
||
| 25 | return []; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getQueryParameters() |
||
| 29 | { |
||
| 30 | return [ |
||
| 31 | 'format' => 'xml', |
||
| 32 | 'results_per_page' => $this->resultsPerPage |
||
| 33 | ]; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getHttpMethod() |
||
| 37 | { |
||
| 38 | return 'GET'; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function getScheme() |
||
| 42 | { |
||
| 43 | return 'https'; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getHost() |
||
| 47 | { |
||
| 48 | return 'thecatapi.com'; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getMethodUrl() |
||
| 52 | { |
||
| 53 | return '/api/images/get'; |
||
| 54 | } |
||
| 55 | |||
| 56 | public function processResponse(ResponseInterface $response) |
||
| 59 | } |
||
| 60 | |||
| 61 | public function handleException(\Throwable $exception) |
||
| 64 | } |
||
| 65 | |||
| 66 | } |