| 1 | <?php declare(strict_types=1); |
||
| 8 | abstract class BaseRequest implements Request |
||
| 9 | { |
||
| 10 | const BASE_URL = 'https://api.twitter.com/1.1'; |
||
| 11 | |||
| 12 | private $method; |
||
| 13 | |||
| 14 | private $endpoint; |
||
| 15 | |||
| 16 | protected $parameters = []; |
||
| 17 | |||
| 18 | 339 | public function __construct(string $method, string $endpoint) |
|
| 19 | { |
||
| 20 | 339 | $this->method = $method; |
|
| 21 | 339 | $this->endpoint = $endpoint; |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function getMethod(): string |
|
| 28 | |||
| 29 | 183 | public function getParameters(): array |
|
| 39 | |||
| 40 | 13 | public function getEndpoint(): Url |
|
| 44 | |||
| 45 | public function handleResponse(array $responseData) |
||
| 49 | } |
||
| 50 |