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