Google_Service_Translate

Service definition for Translate (v2).

Defined (1)

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

/includes/api-libs/Google/Service/Translate.php  
  1. class Google_Service_Translate extends Google_Service 
  2.  
  3.  
  4. public $detections; 
  5. public $languages; 
  6. public $translations; 
  7.  
  8.  
  9. /** 
  10. * Constructs the internal representation of the Translate service. 
  11. * @param Google_Client $client 
  12. */ 
  13. public function __construct(Google_Client $client) 
  14. parent::__construct($client); 
  15. $this->servicePath = 'language/translate/'; 
  16. $this->version = 'v2'; 
  17. $this->serviceName = 'translate'; 
  18.  
  19. $this->detections = new Google_Service_Translate_Detections_Resource( 
  20. $this,  
  21. $this->serviceName,  
  22. 'detections',  
  23. array( 
  24. 'methods' => array( 
  25. 'list' => array( 
  26. 'path' => 'v2/detect',  
  27. 'httpMethod' => 'GET',  
  28. 'parameters' => array( 
  29. 'q' => array( 
  30. 'location' => 'query',  
  31. 'type' => 'string',  
  32. 'repeated' => true,  
  33. 'required' => true,  
  34. ),  
  35. ),  
  36. ),  
  37. ); 
  38. $this->languages = new Google_Service_Translate_Languages_Resource( 
  39. $this,  
  40. $this->serviceName,  
  41. 'languages',  
  42. array( 
  43. 'methods' => array( 
  44. 'list' => array( 
  45. 'path' => 'v2/languages',  
  46. 'httpMethod' => 'GET',  
  47. 'parameters' => array( 
  48. 'target' => array( 
  49. 'location' => 'query',  
  50. 'type' => 'string',  
  51. ),  
  52. ),  
  53. ),  
  54. ); 
  55. $this->translations = new Google_Service_Translate_Translations_Resource( 
  56. $this,  
  57. $this->serviceName,  
  58. 'translations',  
  59. array( 
  60. 'methods' => array( 
  61. 'list' => array( 
  62. 'path' => 'v2',  
  63. 'httpMethod' => 'GET',  
  64. 'parameters' => array( 
  65. 'q' => array( 
  66. 'location' => 'query',  
  67. 'type' => 'string',  
  68. 'repeated' => true,  
  69. 'required' => true,  
  70. ),  
  71. 'target' => array( 
  72. 'location' => 'query',  
  73. 'type' => 'string',  
  74. 'required' => true,  
  75. ),  
  76. 'source' => array( 
  77. 'location' => 'query',  
  78. 'type' => 'string',  
  79. ),  
  80. 'format' => array( 
  81. 'location' => 'query',  
  82. 'type' => 'string',  
  83. ),  
  84. 'cid' => array( 
  85. 'location' => 'query',  
  86. 'type' => 'string',  
  87. 'repeated' => true,  
  88. ),  
  89. ),  
  90. ),  
  91. );