1 | <?php |
||
26 | class Client |
||
27 | { |
||
28 | /** |
||
29 | * @var HttpClient |
||
30 | */ |
||
31 | protected $client; |
||
32 | |||
33 | /** |
||
34 | * @var ResponseFactory |
||
35 | */ |
||
36 | protected $responseFactory; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $endPoint; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $key; |
||
47 | |||
48 | /** |
||
49 | * Construct. |
||
50 | * |
||
51 | * @param HttpClient $client A Guzzle client instance. |
||
52 | * @param ResponseFactory $responseFactory A Response Factory instance. |
||
53 | * @param string $endPoint A KickBox API endpoint. |
||
54 | * @param string $key An Api key generated in kickbox.io. |
||
55 | */ |
||
56 | 3 | public function __construct(HttpClient $client, ResponseFactory $responseFactory, $endPoint, $key) |
|
63 | |||
64 | /** |
||
65 | * Call the Api to validate one specific email address. |
||
66 | * |
||
67 | * @param string $email The email address to be verified |
||
68 | * @param int $timeout Maximum time, in milliseconds, for the API to complete a verification request. |
||
69 | * |
||
70 | * @return Response A Kickbox response instance. |
||
71 | */ |
||
72 | 3 | public function verify($email, $timeout = 6000) |
|
97 | |||
98 | /** |
||
99 | * Return the query parameters for a kickbox api call. |
||
100 | * |
||
101 | * @param string $email The email address. |
||
102 | * @param int $timeout Time in milliseconds. |
||
103 | * |
||
104 | * @return array The query parameters. |
||
105 | */ |
||
106 | 3 | protected function getQueryParameters($email, $timeout = 6000) |
|
116 | } |
||
117 |