1 | <?php |
||
16 | class TheSportsDbClient implements TheSportsDbClientInterface { |
||
17 | |||
18 | /** |
||
19 | * The API key. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $apiKey; |
||
24 | |||
25 | /** |
||
26 | * HTTP Client to fetch data. |
||
27 | * |
||
28 | * @var \GuzzleHttp\ClientInterface |
||
29 | */ |
||
30 | protected $httpClient; |
||
31 | |||
32 | /** |
||
33 | * Creates a \TheSportsDb\Http\TheSportsDbClient object. |
||
34 | * |
||
35 | * @param string $apiKey |
||
36 | * The api key to connect to the sports db service. |
||
37 | * @param ClientInterface $httpClient |
||
38 | * The HTTP client that will make the requests. |
||
39 | */ |
||
40 | public function __construct($apiKey, ClientInterface $httpClient) { |
||
44 | |||
45 | /** |
||
46 | * Get the base url for requests. |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 1 | protected function getBaseUrl() { |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 1 | public function doRequest($endpoint, array $parameters = array()) { |
|
69 | |||
70 | } |
||
71 |