Google_LinksServiceResource

The "links" collection of methods.

Defined (1)

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

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