Google_DetectionsServiceResource

The "detections" collection of methods.

Defined (1)

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

/inc/google-api-php-client/src/contrib/Google_TranslateService.php  
  1. class Google_DetectionsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Detect the language of text. (detections.list) 
  6. * @param string $q The text to detect 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_DetectionsListResponse 
  9. */ 
  10. public function listDetections($q, $optParams = array()) { 
  11. $params = array('q' => $q); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('list', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_DetectionsListResponse($data); 
  16. } else { 
  17. return $data;