@@ 172-180 (lines=9) @@ | ||
169 | * @param string $bookID |
|
170 | * @return string |
|
171 | */ |
|
172 | private function fetchDiscussions($bookID) { |
|
173 | $urlDiscussions = $this->paperhive_base_url . $this->paperhive_api_discussions . $bookID; |
|
174 | try { |
|
175 | $response = $this->client->get($urlDiscussions, []); |
|
176 | } catch (\Exception $e) { |
|
177 | return false; |
|
178 | } |
|
179 | return $response->getBody(); |
|
180 | } |
|
181 | ||
182 | /** |
|
183 | * Does the call to PaperHive Documents API and returns the JSON for a book for specific BookID |
|
@@ 190-198 (lines=9) @@ | ||
187 | * @param string $bookID |
|
188 | * @return string/boolean |
|
189 | */ |
|
190 | private function fetchDocument($bookID) { |
|
191 | $urlDocument = $this->paperhive_base_url . $this->paperhive_api_documents . $bookID; |
|
192 | try { |
|
193 | $response = $this->client->get($urlDocument, []); |
|
194 | } catch (\Exception $e) { |
|
195 | return false; |
|
196 | } |
|
197 | return $response->getBody(); |
|
198 | } |
|
199 | ||
200 | /** |
|
201 | * Gets the informations about the book for specific BookID and saves as a file |