Google_LocationServiceResource

The "location" collection of methods.

Defined (1)

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

/google-api/src/contrib/Google_LatitudeService.php  
  1. class Google_LocationServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Inserts or updates a location in the user's location history. (location.insert) 
  6. * @param Google_Location $postBody 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_Location 
  9. */ 
  10. public function insert(Google_Location $postBody, $optParams = array()) { 
  11. $params = array('postBody' => $postBody); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('insert', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_Location($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * Reads a location from the user's location history. (location.get) 
  20. * @param string $locationId Timestamp of the location to read (ms since epoch). 
  21. * @param array $optParams Optional parameters. 
  22. * @opt_param string granularity Granularity of the location to return. 
  23. * @return Google_Location 
  24. */ 
  25. public function get($locationId, $optParams = array()) { 
  26. $params = array('locationId' => $locationId); 
  27. $params = array_merge($params, $optParams); 
  28. $data = $this->__call('get', array($params)); 
  29. if ($this->useObjects()) { 
  30. return new Google_Location($data); 
  31. } else { 
  32. return $data; 
  33. /** 
  34. * Lists the user's location history. (location.list) 
  35. * @param array $optParams Optional parameters. 
  36. * @opt_param string max-results Maximum number of locations to return. 
  37. * @opt_param string max-time Maximum timestamp of locations to return (ms since epoch). 
  38. * @opt_param string min-time Minimum timestamp of locations to return (ms since epoch). 
  39. * @opt_param string granularity Granularity of the requested locations. 
  40. * @return Google_LocationFeed 
  41. */ 
  42. public function listLocation($optParams = array()) { 
  43. $params = array(); 
  44. $params = array_merge($params, $optParams); 
  45. $data = $this->__call('list', array($params)); 
  46. if ($this->useObjects()) { 
  47. return new Google_LocationFeed($data); 
  48. } else { 
  49. return $data; 
  50. /** 
  51. * Deletes a location from the user's location history. (location.delete) 
  52. * @param string $locationId Timestamp of the location to delete (ms since epoch). 
  53. * @param array $optParams Optional parameters. 
  54. */ 
  55. public function delete($locationId, $optParams = array()) { 
  56. $params = array('locationId' => $locationId); 
  57. $params = array_merge($params, $optParams); 
  58. $data = $this->__call('delete', array($params)); 
  59. return $data;