1 | <?php |
||
18 | class Client extends CommonClient |
||
19 | { |
||
20 | /** |
||
21 | * {@inheritDoc} |
||
22 | */ |
||
23 | public function __construct($apiKey, $apiSecret, $publicationId) |
||
27 | |||
28 | /** |
||
29 | * @param string $url |
||
30 | * @param bool $acceptJsonResponse |
||
31 | * |
||
32 | * @return ResponseInterface |
||
33 | * @throws ItemDoesNotExistsException |
||
34 | * @throws UnsatisfactoryResponseCodeException |
||
35 | * @throws RequestException |
||
36 | */ |
||
37 | protected function apiGet($url, $acceptJsonResponse = true) |
||
49 | |||
50 | /** |
||
51 | * @return array|bool|float|int|string |
||
52 | * @throws ItemDoesNotExistsException |
||
53 | * @throws UnsatisfactoryResponseCodeException |
||
54 | */ |
||
55 | public function getServiceDocument() |
||
61 | |||
62 | /** |
||
63 | * @return array|bool|float|int|string |
||
64 | * @throws ItemDoesNotExistsException |
||
65 | * @throws UnsatisfactoryResponseCodeException |
||
66 | */ |
||
67 | public function getSectionsList() |
||
73 | |||
74 | /** |
||
75 | * @param int $sectionId |
||
76 | * @return array|bool|float|int|string |
||
77 | * @throws ItemDoesNotExistsException |
||
78 | * @throws UnsatisfactoryResponseCodeException |
||
79 | */ |
||
80 | public function getSubsectionsList($sectionId) |
||
86 | |||
87 | /** |
||
88 | * @param string $sectionName |
||
89 | * @return array|bool|float|int|string |
||
90 | */ |
||
91 | public function getSectionByUniqueName($sectionName) |
||
95 | |||
96 | /** |
||
97 | * @param int $sectionId |
||
98 | * @return array|bool|float|int|string |
||
99 | */ |
||
100 | public function getSectionById($sectionId) |
||
104 | |||
105 | /** |
||
106 | * @param string $url |
||
107 | * @return array|bool|float|int|string |
||
108 | * @throws ItemDoesNotExistsException |
||
109 | * @throws UnsatisfactoryResponseCodeException |
||
110 | */ |
||
111 | private function getSection($url) |
||
117 | |||
118 | /** |
||
119 | * @param int|string $sectionId Section id or uniqueName |
||
120 | * @param string $method |
||
121 | * @param array $parameters |
||
122 | * @return array|bool|float|int|string |
||
123 | * @throws InvalidMethodException |
||
124 | * @throws InvalidMethodParametersException |
||
125 | * @throws ItemDoesNotExistsException |
||
126 | * @throws UnsatisfactoryResponseCodeException |
||
127 | */ |
||
128 | public function getArticlesBySectionId($sectionId, $method, $parameters = []) |
||
157 | |||
158 | /** |
||
159 | * @param int $contentId |
||
160 | * @return array|bool|float|int|string |
||
161 | * @throws InvalidContentTypeException |
||
162 | */ |
||
163 | public function getArticle($contentId) |
||
167 | |||
168 | /** |
||
169 | * @return array |
||
170 | * @throws ItemDoesNotExistsException |
||
171 | * @throws UnsatisfactoryResponseCodeException |
||
172 | */ |
||
173 | public function getImageVersions() |
||
191 | |||
192 | /** |
||
193 | * @param int $contentId |
||
194 | * @param string $contentType |
||
195 | * @return array|bool|float|int|string |
||
196 | * @throws InvalidContentTypeException |
||
197 | * @throws ItemDoesNotExistsException |
||
198 | * @throws UnsatisfactoryResponseCodeException |
||
199 | */ |
||
200 | public function searchByInstance($contentId, $contentType) |
||
218 | |||
219 | /** |
||
220 | * @param array $contentIds |
||
221 | * @return array|bool|float|int|string |
||
222 | * @throws ItemDoesNotExistsException |
||
223 | * @throws UnsatisfactoryResponseCodeException |
||
224 | */ |
||
225 | public function searchByCollection($contentIds) |
||
233 | } |
||
234 |