You are here

class TranslationRequestsApiV3 in TMGMT Translator Smartling 8.4

Class TranslationRequestsApiV3 @package Smartling\TranslationRequests

Hierarchy

Expanded class hierarchy of TranslationRequestsApiV3

1 file declares its use of TranslationRequestsApiV3
SmartlingApiFactory.php in src/Smartling/SmartlingApiFactory.php
SmartlingApiFactory.php.

File

src/Smartling/Submission/TranslationRequestsApiV3.php, line 13

Namespace

Drupal\tmgmt_smartling\Smartling\Submission
View source
class TranslationRequestsApiV3 extends TranslationRequestsApi {
  const ENDPOINT_URL = 'https://api.smartling.com/submission-service-api/v3/projects';
  public static function create(AuthApiInterface $authProvider, $projectId, $logger = null) {
    $client = static::initializeHttpClient(static::ENDPOINT_URL);
    $instance = new self($projectId, $client, $logger, static::ENDPOINT_URL);
    $instance
      ->setAuth($authProvider);
    return $instance;
  }
  public function searchTranslationRequests($bucketName, SearchTranslationRequestParams $searchParams) {
    $requestData = $this
      ->getDefaultRequestData('json', $searchParams
      ->exportToArray());
    $requestUri = vsprintf('buckets/%s/search/translation-requests', [
      $bucketName,
    ]);
    return $this
      ->sendRequest($requestUri, $requestData, static::HTTP_METHOD_POST);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BaseApiAbstract::$auth private property
BaseApiAbstract::$baseUrl private property Smartling API base url.
BaseApiAbstract::$currentClientId private static property
BaseApiAbstract::$currentClientUserAgentExtension private static property
BaseApiAbstract::$currentClientVersion private static property
BaseApiAbstract::$httpClient private property Http Client abstraction.
BaseApiAbstract::$logger private property Logger.
BaseApiAbstract::$projectId private property Project Id in Smartling dashboard
BaseApiAbstract::checkAuthenticationError private function
BaseApiAbstract::CLIENT_LIB_ID_SDK constant
BaseApiAbstract::CLIENT_LIB_ID_VERSION constant
BaseApiAbstract::CLIENT_USER_AGENT_EXTENSION constant
BaseApiAbstract::getAuth protected function
BaseApiAbstract::getBaseUrl protected function
BaseApiAbstract::getCurrentClientId public static function
BaseApiAbstract::getCurrentClientUserAgentExtension public static function
BaseApiAbstract::getCurrentClientVersion public static function
BaseApiAbstract::getDefaultRequestData protected function 1
BaseApiAbstract::getHttpClient protected function
BaseApiAbstract::getLogger protected function
BaseApiAbstract::getProjectId protected function
BaseApiAbstract::HTTP_METHOD_DELETE constant
BaseApiAbstract::HTTP_METHOD_GET constant
BaseApiAbstract::HTTP_METHOD_POST constant
BaseApiAbstract::HTTP_METHOD_PUT constant
BaseApiAbstract::initializeHttpClient protected static function
BaseApiAbstract::normalizeUri private function
BaseApiAbstract::PATTERN_DATE_TIME_ISO_8601 constant PHP equivalent to 'YYYY-MM-DDThh:mm:ssZ'
BaseApiAbstract::processBodyOptions protected function 3
BaseApiAbstract::processError private function
BaseApiAbstract::processErrors private function
BaseApiAbstract::readFile protected function OOP wrapper for fopen() function.
BaseApiAbstract::sendRequest protected function
BaseApiAbstract::setAuth protected function
BaseApiAbstract::setBaseUrl protected function
BaseApiAbstract::setCurrentClientId public static function
BaseApiAbstract::setCurrentClientUserAgentExtension public static function
BaseApiAbstract::setCurrentClientVersion public static function
BaseApiAbstract::setHttpClient protected function
BaseApiAbstract::setLogger protected function
BaseApiAbstract::setProjectId protected function
BaseApiAbstract::__construct public function BaseApiAbstract constructor. 3
TranslationRequestsApi::createTranslationRequest public function
TranslationRequestsApi::getTranslationRequest public function
TranslationRequestsApi::updateTranslationRequest public function
TranslationRequestsApiV3::create public static function Overrides TranslationRequestsApi::create
TranslationRequestsApiV3::ENDPOINT_URL constant Overrides TranslationRequestsApi::ENDPOINT_URL
TranslationRequestsApiV3::searchTranslationRequests public function Overrides TranslationRequestsApi::searchTranslationRequests