Google_LinksServiceResource

The "links" collection of methods.

Defined (1)

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

/src/contrib/Google_GanService.php  
  1. class Google_LinksServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Retrieves data about a single link if the requesting advertiser/publisher has access to it. 
  5. * Advertisers can look up their own links. Publishers can look up visible links or links belonging 
  6. * to advertisers they are in a relationship with. (links.get) 
  7. * @param string $role The role of the requester. Valid values: 'advertisers' or 'publishers'. 
  8. * @param string $roleId The ID of the requesting advertiser or publisher. 
  9. * @param string $linkId The ID of the link to look up. 
  10. * @param array $optParams Optional parameters. 
  11. * @return Google_Link 
  12. */ 
  13. public function get($role, $roleId, $linkId, $optParams = array()) { 
  14. $params = array('role' => $role, 'roleId' => $roleId, 'linkId' => $linkId); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('get', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_Link($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Inserts a new link. (links.insert) 
  23. * @param string $role The role of the requester. Valid values: 'advertisers' or 'publishers'. 
  24. * @param string $roleId The ID of the requesting advertiser or publisher. 
  25. * @param Google_Link $postBody 
  26. * @param array $optParams Optional parameters. 
  27. * @return Google_Link 
  28. */ 
  29. public function insert($role, $roleId, Google_Link $postBody, $optParams = array()) { 
  30. $params = array('role' => $role, 'roleId' => $roleId, 'postBody' => $postBody); 
  31. $params = array_merge($params, $optParams); 
  32. $data = $this->__call('insert', array($params)); 
  33. if ($this->useObjects()) { 
  34. return new Google_Link($data); 
  35. } else { 
  36. return $data; 
  37. /** 
  38. * Retrieves all links that match the query parameters. (links.list) 
  39. * @param string $role The role of the requester. Valid values: 'advertisers' or 'publishers'. 
  40. * @param string $roleId The ID of the requesting advertiser or publisher. 
  41. * @param array $optParams Optional parameters. 
  42. * @opt_param string advertiserId Limits the resulting links to the ones belonging to the listed advertisers. 
  43. * @opt_param string assetSize The size of the given asset. 
  44. * @opt_param string authorship The role of the author of the link. 
  45. * @opt_param string createDateMax The end of the create date range. 
  46. * @opt_param string createDateMin The beginning of the create date range. 
  47. * @opt_param string linkType The type of the link. 
  48. * @opt_param string maxResults Max number of items to return in this page. Optional. Defaults to 20. 
  49. * @opt_param string pageToken The value of 'nextPageToken' from the previous page. Optional. 
  50. * @opt_param string promotionType The promotion type. 
  51. * @opt_param string relationshipStatus The status of the relationship. 
  52. * @opt_param string searchText Field for full text search across title and merchandising text, supports link id search. 
  53. * @opt_param string startDateMax The end of the start date range. 
  54. * @opt_param string startDateMin The beginning of the start date range. 
  55. * @return Google_Links 
  56. */ 
  57. public function listLinks($role, $roleId, $optParams = array()) { 
  58. $params = array('role' => $role, 'roleId' => $roleId); 
  59. $params = array_merge($params, $optParams); 
  60. $data = $this->__call('list', array($params)); 
  61. if ($this->useObjects()) { 
  62. return new Google_Links($data); 
  63. } else { 
  64. return $data;