You are here

protected function SmartlingTranslator::doRequest in TMGMT Translator Smartling 8

Execute a request against the Smartling API.

Parameters

Translator $translator: The translator entity to get the settings from.

$path: The path that should be appended to the base uri, e.g. Translate or GetLanguagesForTranslate.

$query: (Optional) Array of GET query arguments.

$headers: (Optional) Array of additional HTTP headers.

Return value

array The HTTP response.

File

src/Plugin/tmgmt/Translator/SmartlingTranslator.php, line 245
Contains \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator.

Class

SmartlingTranslator
Smartling translator plugin.

Namespace

Drupal\tmgmt_smartling\Plugin\tmgmt\Translator

Code

protected function doRequest(Translator $translator, $path, array $query = array(), array $headers = array()) {

  // @todo We don't need it at all.
  $response = $this->smartlingApi
    ->uploadFile($path);
  return $response;
}