You are here

public function Lingotek::getDocumentContent in Lingotek Translation 8

File

src/Lingotek.php, line 413
Contains \Drupal\lingotek\Lingotek.

Class

Lingotek

Namespace

Drupal\lingotek

Code

public function getDocumentContent($doc_id) {
  $response = $this
    ->get($this->api_url . '/document/' . $doc_id . '/content');
  if (!is_wp_error($response) && 200 == wp_remote_retrieve_response_code($response)) {
    $content = wp_remote_retrieve_body($response);
  }
  return $content;
}