blob: db91bd85d7e017ba396d025b90516a595d7d3a80 [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="gan_v1beta1.html">Google Affiliate Network API</a> . <a href="gan_v1beta1.links.html">links</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(role, roleId, linkId)</a></code></p>
79<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>
80<p class="toc_element">
81 <code><a href="#insert">insert(role, roleId, body)</a></code></p>
82<p class="firstline">Inserts a new link.</p>
83<p class="toc_element">
Joe Gregoriod67010d2012-11-05 08:57:06 -050084 <code><a href="#list">list(role, roleId, linkType=None, promotionType=None, createDateMax=None, advertiserId=None, pageToken=None, relationshipStatus=None, maxResults=None, authorship=None, startDateMin=None, assetSize=None, searchText=None, startDateMax=None, createDateMin=None)</a></code></p>
Joe Gregorio075572b2012-07-09 16:53:09 -040085<p class="firstline">Retrieves all links that match the query parameters.</p>
86<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="get">get(role, roleId, linkId)</code>
92 <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.
93
94Args:
95 role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
96 Allowed values
97 advertisers - The requester is requesting as an advertiser.
98 publishers - The requester is requesting as a publisher.
99 roleId: string, The ID of the requesting advertiser or publisher. (required)
100 linkId: string, The ID of the link to look up. (required)
101
102Returns:
103 An object of the form:
104
105 { # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400106 "isActive": True or False, # Flag for if this link is active.
107 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400108 "kind": "gan#link", # The kind for one entity.
109 "endDate": "A String", # Date that this link becomes inactive.
110 "description": "A String", # Description.
111 "name": "A String", # The logical name for this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500112 "specialOffers": { # Special offers on the link.
113 "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
114 "amount": 3.14, # The amount of money.
115 "currencyCode": "A String", # The 3-letter code of the currency in question.
116 },
117 "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
118 "amount": 3.14, # The amount of money.
119 "currencyCode": "A String", # The 3-letter code of the currency in question.
120 },
121 "freeShipping": True or False, # Whether there is free shipping
122 "promotionCodes": [ # List of promotion code associated with the link
123 "A String",
124 ],
125 "percentOff": 3.14, # Percent off on the purchase
126 "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
127 "amount": 3.14, # The amount of money.
128 "currencyCode": "A String", # The 3-letter code of the currency in question.
129 },
130 "freeGift": True or False, # Whether there is a free gift
131 "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
132 "amount": 3.14, # The amount of money.
133 "currencyCode": "A String", # The 3-letter code of the currency in question.
134 },
135 },
136 "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
137 "amount": 3.14, # The amount of money.
138 "currencyCode": "A String", # The 3-letter code of the currency in question.
139 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400140 "createDate": "A String", # Date that this link was created.
141 "imageAltText": "A String", # image alt text.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500142 "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
143 "amount": 3.14, # The amount of money.
144 "currencyCode": "A String", # The 3-letter code of the currency in question.
145 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400146 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500147 "id": "A String", # The ID of this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400148 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400149 "promotionType": "A String", # Promotion Type
150 "duration": "A String", # Duration
151 "authorship": "A String", # Authorship
Joe Gregoriod67010d2012-11-05 08:57:06 -0500152 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400153 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400154 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400155 "destinationUrl": "A String", # The destination URL for the link.
156 }</pre>
157</div>
158
159<div class="method">
160 <code class="details" id="insert">insert(role, roleId, body)</code>
161 <pre>Inserts a new link.
162
163Args:
164 role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
165 Allowed values
166 advertisers - The requester is requesting as an advertiser.
167 publishers - The requester is requesting as a publisher.
168 roleId: string, The ID of the requesting advertiser or publisher. (required)
169 body: object, The request body. (required)
170 The object takes the form of:
171
172{ # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400173 "isActive": True or False, # Flag for if this link is active.
174 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400175 "kind": "gan#link", # The kind for one entity.
176 "endDate": "A String", # Date that this link becomes inactive.
177 "description": "A String", # Description.
178 "name": "A String", # The logical name for this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500179 "specialOffers": { # Special offers on the link.
180 "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
181 "amount": 3.14, # The amount of money.
182 "currencyCode": "A String", # The 3-letter code of the currency in question.
183 },
184 "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
185 "amount": 3.14, # The amount of money.
186 "currencyCode": "A String", # The 3-letter code of the currency in question.
187 },
188 "freeShipping": True or False, # Whether there is free shipping
189 "promotionCodes": [ # List of promotion code associated with the link
190 "A String",
191 ],
192 "percentOff": 3.14, # Percent off on the purchase
193 "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
194 "amount": 3.14, # The amount of money.
195 "currencyCode": "A String", # The 3-letter code of the currency in question.
196 },
197 "freeGift": True or False, # Whether there is a free gift
198 "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
199 "amount": 3.14, # The amount of money.
200 "currencyCode": "A String", # The 3-letter code of the currency in question.
201 },
202 },
203 "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
204 "amount": 3.14, # The amount of money.
205 "currencyCode": "A String", # The 3-letter code of the currency in question.
206 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400207 "createDate": "A String", # Date that this link was created.
208 "imageAltText": "A String", # image alt text.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500209 "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
210 "amount": 3.14, # The amount of money.
211 "currencyCode": "A String", # The 3-letter code of the currency in question.
212 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400213 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500214 "id": "A String", # The ID of this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400215 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400216 "promotionType": "A String", # Promotion Type
217 "duration": "A String", # Duration
218 "authorship": "A String", # Authorship
Joe Gregoriod67010d2012-11-05 08:57:06 -0500219 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400220 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400221 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400222 "destinationUrl": "A String", # The destination URL for the link.
223 }
224
225
226Returns:
227 An object of the form:
228
229 { # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400230 "isActive": True or False, # Flag for if this link is active.
231 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400232 "kind": "gan#link", # The kind for one entity.
233 "endDate": "A String", # Date that this link becomes inactive.
234 "description": "A String", # Description.
235 "name": "A String", # The logical name for this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500236 "specialOffers": { # Special offers on the link.
237 "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
238 "amount": 3.14, # The amount of money.
239 "currencyCode": "A String", # The 3-letter code of the currency in question.
240 },
241 "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
242 "amount": 3.14, # The amount of money.
243 "currencyCode": "A String", # The 3-letter code of the currency in question.
244 },
245 "freeShipping": True or False, # Whether there is free shipping
246 "promotionCodes": [ # List of promotion code associated with the link
247 "A String",
248 ],
249 "percentOff": 3.14, # Percent off on the purchase
250 "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
251 "amount": 3.14, # The amount of money.
252 "currencyCode": "A String", # The 3-letter code of the currency in question.
253 },
254 "freeGift": True or False, # Whether there is a free gift
255 "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
256 "amount": 3.14, # The amount of money.
257 "currencyCode": "A String", # The 3-letter code of the currency in question.
258 },
259 },
260 "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
261 "amount": 3.14, # The amount of money.
262 "currencyCode": "A String", # The 3-letter code of the currency in question.
263 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400264 "createDate": "A String", # Date that this link was created.
265 "imageAltText": "A String", # image alt text.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500266 "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
267 "amount": 3.14, # The amount of money.
268 "currencyCode": "A String", # The 3-letter code of the currency in question.
269 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400270 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500271 "id": "A String", # The ID of this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400272 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400273 "promotionType": "A String", # Promotion Type
274 "duration": "A String", # Duration
275 "authorship": "A String", # Authorship
Joe Gregoriod67010d2012-11-05 08:57:06 -0500276 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400277 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400278 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400279 "destinationUrl": "A String", # The destination URL for the link.
280 }</pre>
281</div>
282
283<div class="method">
Joe Gregoriod67010d2012-11-05 08:57:06 -0500284 <code class="details" id="list">list(role, roleId, linkType=None, promotionType=None, createDateMax=None, advertiserId=None, pageToken=None, relationshipStatus=None, maxResults=None, authorship=None, startDateMin=None, assetSize=None, searchText=None, startDateMax=None, createDateMin=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -0400285 <pre>Retrieves all links that match the query parameters.
286
287Args:
288 role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
289 Allowed values
290 advertisers - The requester is requesting as an advertiser.
291 publishers - The requester is requesting as a publisher.
292 roleId: string, The ID of the requesting advertiser or publisher. (required)
293 linkType: string, The type of the link.
294 Allowed values
295 banner -
296 text -
297 promotionType: string, The promotion type. (repeated)
298 Allowed values
Joe Gregorio075572b2012-07-09 16:53:09 -0400299 coupon -
300 free_gift -
Joe Gregorio075572b2012-07-09 16:53:09 -0400301 free_shipping -
Joe Gregorio075572b2012-07-09 16:53:09 -0400302 percent_off -
303 price_cut -
Joe Gregoriod67010d2012-11-05 08:57:06 -0500304 createDateMax: string, The end of the create date range.
Joe Gregorio075572b2012-07-09 16:53:09 -0400305 advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated)
306 pageToken: string, The value of 'nextPageToken' from the previous page. Optional.
307 relationshipStatus: string, The status of the relationship.
308 Allowed values
309 approved -
310 available -
311 maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.
Joe Gregorio075572b2012-07-09 16:53:09 -0400312 authorship: string, The role of the author of the link.
313 Allowed values
314 advertiser -
315 publisher -
316 startDateMin: string, The beginning of the start date range.
317 assetSize: string, The size of the given asset. (repeated)
Joe Gregoriod67010d2012-11-05 08:57:06 -0500318 searchText: string, Field for full text search across title and merchandising text, supports link id search.
Joe Gregorio075572b2012-07-09 16:53:09 -0400319 startDateMax: string, The end of the start date range.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500320 createDateMin: string, The beginning of the create date range.
Joe Gregorio075572b2012-07-09 16:53:09 -0400321
322Returns:
323 An object of the form:
324
325 {
326 "nextPageToken": "A String", # The next page token.
327 "items": [ # The links.
328 { # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400329 "isActive": True or False, # Flag for if this link is active.
330 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400331 "kind": "gan#link", # The kind for one entity.
332 "endDate": "A String", # Date that this link becomes inactive.
333 "description": "A String", # Description.
334 "name": "A String", # The logical name for this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500335 "specialOffers": { # Special offers on the link.
336 "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
337 "amount": 3.14, # The amount of money.
338 "currencyCode": "A String", # The 3-letter code of the currency in question.
339 },
340 "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
341 "amount": 3.14, # The amount of money.
342 "currencyCode": "A String", # The 3-letter code of the currency in question.
343 },
344 "freeShipping": True or False, # Whether there is free shipping
345 "promotionCodes": [ # List of promotion code associated with the link
346 "A String",
347 ],
348 "percentOff": 3.14, # Percent off on the purchase
349 "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
350 "amount": 3.14, # The amount of money.
351 "currencyCode": "A String", # The 3-letter code of the currency in question.
352 },
353 "freeGift": True or False, # Whether there is a free gift
354 "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
355 "amount": 3.14, # The amount of money.
356 "currencyCode": "A String", # The 3-letter code of the currency in question.
357 },
358 },
359 "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
360 "amount": 3.14, # The amount of money.
361 "currencyCode": "A String", # The 3-letter code of the currency in question.
362 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400363 "createDate": "A String", # Date that this link was created.
364 "imageAltText": "A String", # image alt text.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500365 "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
366 "amount": 3.14, # The amount of money.
367 "currencyCode": "A String", # The 3-letter code of the currency in question.
368 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400369 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500370 "id": "A String", # The ID of this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400371 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400372 "promotionType": "A String", # Promotion Type
373 "duration": "A String", # Duration
374 "authorship": "A String", # Authorship
Joe Gregoriod67010d2012-11-05 08:57:06 -0500375 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400376 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400377 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400378 "destinationUrl": "A String", # The destination URL for the link.
379 },
380 ],
381 "kind": "gan#links", # The kind for a page of links.
382 }</pre>
383</div>
384
385<div class="method">
386 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
387 <pre>Retrieves the next page of results.
388
389Args:
390 previous_request: The request for the previous page. (required)
391 previous_response: The response from the request for the previous page. (required)
392
393Returns:
394 A request object that you can call 'execute()' on to request the next
395 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500396 </pre>
Joe Gregorio075572b2012-07-09 16:53:09 -0400397</div>
398
399</body></html>