class TranslationRequestsApiV3 in TMGMT Translator Smartling 8.4
Class TranslationRequestsApiV3 @package Smartling\TranslationRequests
Hierarchy
- class \Smartling\BaseApiAbstract
- class \Smartling\TranslationRequests\TranslationRequestsApi
- class \Drupal\tmgmt_smartling\Smartling\Submission\TranslationRequestsApiV3
- class \Smartling\TranslationRequests\TranslationRequestsApi
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\SubmissionView 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);
}
}