Google Affiliate Network API . links

Instance Methods

get(role, roleId, linkId)

Retrieves data about a single link if the requesting advertiser/publisher has access to it. Advertisers can look up their own links. Publishers can look up visible links or links belonging to advertisers they are in a relationship with.

insert(role, roleId, body)

Inserts a new link.

list(role, roleId, linkType=None, promotionType=None, advertiserId=None, pageToken=None, relationshipStatus=None, maxResults=None, advertiserCategory=None, authorship=None, startDateMin=None, assetSize=None, startDateMax=None)

Retrieves all links that match the query parameters.

list_next(previous_request, previous_response)

Retrieves the next page of results.

Method Details

get(role, roleId, linkId)
Retrieves data about a single link if the requesting advertiser/publisher has access to it. Advertisers can look up their own links. Publishers can look up visible links or links belonging to advertisers they are in a relationship with.

Args:
  role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
    Allowed values
      advertisers - The requester is requesting as an advertiser.
      publishers - The requester is requesting as a publisher.
  roleId: string, The ID of the requesting advertiser or publisher. (required)
  linkId: string, The ID of the link to look up. (required)

Returns:
  An object of the form:

    { # A LinkResource.
      "isActive": True or False, # Flag for if this link is active.
      "linkType": "A String", # The link type.
      "kind": "gan#link", # The kind for one entity.
      "endDate": "A String", # Date that this link becomes inactive.
      "description": "A String", # Description.
      "name": "A String", # The logical name for this link.
      "startDate": "A String", # Date that this link becomes active.
      "createDate": "A String", # Date that this link was created.
      "imageAltText": "A String", # image alt text.
      "id": "A String", # The ID of this link.
      "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
      "impressionTrackingUrl": "A String", # Tracking url for impressions.
      "promotionType": "A String", # Promotion Type
      "duration": "A String", # Duration
      "authorship": "A String", # Authorship
      "availability": "A String", # Availability.
      "clickTrackingUrl": "A String", # Tracking url for clicks.
      "destinationUrl": "A String", # The destination URL for the link.
    }
insert(role, roleId, body)
Inserts a new link.

Args:
  role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
    Allowed values
      advertisers - The requester is requesting as an advertiser.
      publishers - The requester is requesting as a publisher.
  roleId: string, The ID of the requesting advertiser or publisher. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # A LinkResource.
    "isActive": True or False, # Flag for if this link is active.
    "linkType": "A String", # The link type.
    "kind": "gan#link", # The kind for one entity.
    "endDate": "A String", # Date that this link becomes inactive.
    "description": "A String", # Description.
    "name": "A String", # The logical name for this link.
    "startDate": "A String", # Date that this link becomes active.
    "createDate": "A String", # Date that this link was created.
    "imageAltText": "A String", # image alt text.
    "id": "A String", # The ID of this link.
    "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
    "impressionTrackingUrl": "A String", # Tracking url for impressions.
    "promotionType": "A String", # Promotion Type
    "duration": "A String", # Duration
    "authorship": "A String", # Authorship
    "availability": "A String", # Availability.
    "clickTrackingUrl": "A String", # Tracking url for clicks.
    "destinationUrl": "A String", # The destination URL for the link.
  }


Returns:
  An object of the form:

    { # A LinkResource.
      "isActive": True or False, # Flag for if this link is active.
      "linkType": "A String", # The link type.
      "kind": "gan#link", # The kind for one entity.
      "endDate": "A String", # Date that this link becomes inactive.
      "description": "A String", # Description.
      "name": "A String", # The logical name for this link.
      "startDate": "A String", # Date that this link becomes active.
      "createDate": "A String", # Date that this link was created.
      "imageAltText": "A String", # image alt text.
      "id": "A String", # The ID of this link.
      "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
      "impressionTrackingUrl": "A String", # Tracking url for impressions.
      "promotionType": "A String", # Promotion Type
      "duration": "A String", # Duration
      "authorship": "A String", # Authorship
      "availability": "A String", # Availability.
      "clickTrackingUrl": "A String", # Tracking url for clicks.
      "destinationUrl": "A String", # The destination URL for the link.
    }
list(role, roleId, linkType=None, promotionType=None, advertiserId=None, pageToken=None, relationshipStatus=None, maxResults=None, advertiserCategory=None, authorship=None, startDateMin=None, assetSize=None, startDateMax=None)
Retrieves all links that match the query parameters.

Args:
  role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
    Allowed values
      advertisers - The requester is requesting as an advertiser.
      publishers - The requester is requesting as a publisher.
  roleId: string, The ID of the requesting advertiser or publisher. (required)
  linkType: string, The type of the link.
    Allowed values
      banner - 
      text - 
  promotionType: string, The promotion type. (repeated)
    Allowed values
      buy_get - 
      coupon - 
      free_gift - 
      free_gift_wrap - 
      free_shipping - 
      none - 
      ongoing - 
      percent_off - 
      price_cut - 
      product_promotion - 
      sale - 
      sweepstakes - 
  advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated)
  pageToken: string, The value of 'nextPageToken' from the previous page. Optional.
  relationshipStatus: string, The status of the relationship.
    Allowed values
      approved - 
      available - 
  maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.
  advertiserCategory: string, The advertiser's primary vertical. (repeated)
    Allowed values
      apparel_accessories - 
      appliances_electronics - 
      auto_dealer - 
      automotive - 
      babies_kids - 
      blogs_personal_sites - 
      books_magazines - 
      computers - 
      dating - 
      department_stores - 
      education - 
      employment - 
      financial_credit_cards - 
      financial_other - 
      flowers_gifts - 
      grocery - 
      health_beauty - 
      home_garden - 
      hosting_domain - 
      internet_providers - 
      legal - 
      media_entertainment - 
      medical - 
      movies_games - 
      music - 
      nonprofit - 
      office_supplies - 
      online_games - 
      outdoor - 
      pets - 
      real_estate - 
      restaurants - 
      sport_fitness - 
      telecom - 
      ticketing - 
      toys_hobbies - 
      travel - 
      utilities - 
      wholesale_relationship - 
      wine_spirits - 
  authorship: string, The role of the author of the link.
    Allowed values
      advertiser - 
      publisher - 
  startDateMin: string, The beginning of the start date range.
  assetSize: string, The size of the given asset. (repeated)
  startDateMax: string, The end of the start date range.

Returns:
  An object of the form:

    {
    "nextPageToken": "A String", # The next page token.
    "items": [ # The links.
      { # A LinkResource.
          "isActive": True or False, # Flag for if this link is active.
          "linkType": "A String", # The link type.
          "kind": "gan#link", # The kind for one entity.
          "endDate": "A String", # Date that this link becomes inactive.
          "description": "A String", # Description.
          "name": "A String", # The logical name for this link.
          "startDate": "A String", # Date that this link becomes active.
          "createDate": "A String", # Date that this link was created.
          "imageAltText": "A String", # image alt text.
          "id": "A String", # The ID of this link.
          "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
          "impressionTrackingUrl": "A String", # Tracking url for impressions.
          "promotionType": "A String", # Promotion Type
          "duration": "A String", # Duration
          "authorship": "A String", # Authorship
          "availability": "A String", # Availability.
          "clickTrackingUrl": "A String", # Tracking url for clicks.
          "destinationUrl": "A String", # The destination URL for the link.
        },
    ],
    "kind": "gan#links", # The kind for a page of links.
  }
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.