__DIR__ . '/ServiceDefinition/translate-v2.json', 'componentVersion' => TranslateClient::VERSION ]; $this->setRequestWrapper(new RequestWrapper($config)); $this->setRequestBuilder(new RequestBuilder( $config['serviceDefinitionPath'], $this->getApiEndpoint(self::DEFAULT_API_ENDPOINT, $config) )); } /** * @param array $args * @return array */ public function listDetections(array $args = []) { return $this->send('detections', 'detect', $args); } /** * @param array $args * @return array */ public function listLanguages(array $args = []) { return $this->send('languages', 'list', $args); } /** * @param array $args * @return array */ public function listTranslations(array $args = []) { return $this->send('translations', 'translate', $args); } } //@codingStandardsIgnoreStart // Adding a class alias for backwards compatibility with the previous class name. class_alias(Rest::class, \Google\Cloud\Translate\Connection\Rest::class); //@codingStandardsIgnoreEnd