1 | <?php |
||
12 | class HunterClient implements EndpointInterface |
||
13 | { |
||
14 | /** @var string */ |
||
15 | protected $api_key; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $base_url = "https://api.hunter.io/v2"; |
||
19 | |||
20 | /** @var string */ |
||
21 | public $endpoint = ""; |
||
22 | |||
23 | /** @var array */ |
||
24 | public $query_params = []; |
||
25 | |||
26 | /** |
||
27 | * @param string|null $api_key |
||
28 | * @throws AuthorizationException |
||
29 | */ |
||
30 | public function __construct(string $api_key = null) |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * @param mixed $attr |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function __get($attr) |
||
47 | |||
48 | public function make() |
||
54 | |||
55 | protected function buildUrl() |
||
59 | |||
60 | public function get() |
||
70 | |||
71 | protected function handleErrors(Response $response) |
||
86 | } |
||
87 |