You are here

public function LingotekApi::getDocuments in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getDocuments()

File

src/Remote/LingotekApi.php, line 149
Contains \Drupal\lingotek\Remote\LingotekApi.

Class

LingotekApi

Namespace

Drupal\lingotek\Remote

Code

public function getDocuments($args = array()) {
  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();
}