Google_TranslateService
Service definition for Google_Translate (v2).
Defined (1)
The class is defined in the following location(s).
- /google-api/src/contrib/Google_TranslateService.php
- class Google_TranslateService extends Google_Service {
- public $languages;
- public $detections;
- public $translations;
- /**
- * Constructs the internal representation of the Translate service.
- *
- * @param Google_Client $client
- */
- public function __construct(Google_Client $client) {
- $this->servicePath = 'language/translate/';
- $this->version = 'v2';
- $this->serviceName = 'translate';
- $client->addService($this->serviceName, $this->version);
- $this->languages = new Google_LanguagesServiceResource($this, $this->serviceName, 'languages', json_decode('{"methods": {"list": {"httpMethod": "GET", "response": {"$ref": "LanguagesListResponse"}, "id": "language.languages.list", "parameters": {"target": {"type": "string", "location": "query"}}, "path": "v2/languages"}}}', true));
- $this->detections = new Google_DetectionsServiceResource($this, $this->serviceName, 'detections', json_decode('{"methods": {"list": {"httpMethod": "GET", "response": {"$ref": "DetectionsListResponse"}, "id": "language.detections.list", "parameters": {"q": {"repeated": true, "required": true, "type": "string", "location": "query"}}, "path": "v2/detect"}}}', true));
- $this->translations = new Google_TranslationsServiceResource($this, $this->serviceName, 'translations', json_decode('{"methods": {"list": {"httpMethod": "GET", "response": {"$ref": "TranslationsListResponse"}, "id": "language.translations.list", "parameters": {"q": {"repeated": true, "required": true, "type": "string", "location": "query"}, "source": {"type": "string", "location": "query"}, "format": {"enum": ["html", "text"], "type": "string", "location": "query"}, "target": {"required": true, "type": "string", "location": "query"}, "cid": {"repeated": true, "type": "string", "location": "query"}}, "path": "v2"}}}', true));
- }
- }