public function LingotekApi::getDocuments in Lingotek Translation 8.2
Same name and namespace in other branches
- 8 src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getDocuments()
File
- src/
Remote/ LingotekApi.php, line 203
Class
- LingotekApi
- A simple connector to the Lingotek Translation API.
Namespace
Drupal\lingotek\RemoteCode
public function getDocuments($args = []) {
try {
$this->logger
->debug('Lingotek::getDocuments called');
$response = $this->lingotekClient
->get('/api/document/', $args);
} catch (\Exception $e) {
throw new LingotekApiException('Failed to get documents: ' . $e
->getMessage());
}
return $response
->getBody();
}