Google_TranslateService

Service definition for Google_Translate (v2).

Defined (1)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_TranslateService.php  
  1. class Google_TranslateService extends Google_Service { 
  2. public $languages; 
  3. public $detections; 
  4. public $translations; 
  5. /** 
  6. * Constructs the internal representation of the Translate service. 
  7. * @param Google_Client $client 
  8. */ 
  9. public function __construct(Google_Client $client) { 
  10. $this->servicePath = 'language/translate/'; 
  11. $this->version = 'v2'; 
  12. $this->serviceName = 'translate'; 
  13.  
  14. $client->addService($this->serviceName, $this->version); 
  15. $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)); 
  16. $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)); 
  17. $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)); 
  18.