blob: ae6a889c90111b189b3ea3b270224efc5d8ec92b [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="gan_v1beta1.html">Google Affiliate Network API</a> . <a href="gan_v1beta1.links.html">links</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#get">get(role, roleId, linkId)</a></code></p>
<p class="firstline">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.</p>
<p class="toc_element">
<code><a href="#insert">insert(role, roleId, body)</a></code></p>
<p class="firstline">Inserts a new link.</p>
<p class="toc_element">
<code><a href="#list">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)</a></code></p>
<p class="firstline">Retrieves all links that match the query parameters.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="get">get(role, roleId, linkId)</code>
<pre>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.
}</pre>
</div>
<div class="method">
<code class="details" id="insert">insert(role, roleId, body)</code>
<pre>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.
}</pre>
</div>
<div class="method">
<code class="details" id="list">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)</code>
<pre>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.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>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.
</pre>
</div>
</body></html>