1 | <?php |
||
13 | class Client |
||
14 | { |
||
15 | /** @var string base url */ |
||
16 | const BASE_URL = 'https://api.crowdin.com/api/'; |
||
17 | |||
18 | /** @var HttpClient */ |
||
19 | protected $httpClient; |
||
20 | |||
21 | /** @var string the project identifier */ |
||
22 | protected $projectIdentifier; |
||
23 | |||
24 | /** @var string the project api key */ |
||
25 | protected $projectApiKey; |
||
26 | |||
27 | /** |
||
28 | * Instantiate a new Crowdin Client |
||
29 | * |
||
30 | * @param string $identifier the project identifier |
||
31 | * @param string $apiKey the project api key |
||
32 | */ |
||
33 | public function __construct($identifier, $apiKey) |
||
38 | |||
39 | /** |
||
40 | * @param string $method the api method |
||
41 | * |
||
42 | * @throws InvalidArgumentException |
||
43 | * |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function api($method) |
||
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | public function getProjectIdentifier() |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getProjectApiKey() |
||
108 | |||
109 | /** |
||
110 | * @return HttpClient |
||
111 | */ |
||
112 | public function getHttpClient() |
||
120 | } |
||
121 |