blob: ae6a889c90111b189b3ea3b270224efc5d8ec92b [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">
84 <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>
85<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 Gregorioad8013f2012-08-03 08:44:02 -0400112 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400113 "createDate": "A String", # Date that this link was created.
114 "imageAltText": "A String", # image alt text.
115 "id": "A String", # The ID of this link.
116 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400117 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400118 "promotionType": "A String", # Promotion Type
119 "duration": "A String", # Duration
120 "authorship": "A String", # Authorship
121 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400122 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400123 "destinationUrl": "A String", # The destination URL for the link.
124 }</pre>
125</div>
126
127<div class="method">
128 <code class="details" id="insert">insert(role, roleId, body)</code>
129 <pre>Inserts a new link.
130
131Args:
132 role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
133 Allowed values
134 advertisers - The requester is requesting as an advertiser.
135 publishers - The requester is requesting as a publisher.
136 roleId: string, The ID of the requesting advertiser or publisher. (required)
137 body: object, The request body. (required)
138 The object takes the form of:
139
140{ # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400141 "isActive": True or False, # Flag for if this link is active.
142 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400143 "kind": "gan#link", # The kind for one entity.
144 "endDate": "A String", # Date that this link becomes inactive.
145 "description": "A String", # Description.
146 "name": "A String", # The logical name for this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400147 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400148 "createDate": "A String", # Date that this link was created.
149 "imageAltText": "A String", # image alt text.
150 "id": "A String", # The ID of this link.
151 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400152 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400153 "promotionType": "A String", # Promotion Type
154 "duration": "A String", # Duration
155 "authorship": "A String", # Authorship
156 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400157 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400158 "destinationUrl": "A String", # The destination URL for the link.
159 }
160
161
162Returns:
163 An object of the form:
164
165 { # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400166 "isActive": True or False, # Flag for if this link is active.
167 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400168 "kind": "gan#link", # The kind for one entity.
169 "endDate": "A String", # Date that this link becomes inactive.
170 "description": "A String", # Description.
171 "name": "A String", # The logical name for this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400172 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400173 "createDate": "A String", # Date that this link was created.
174 "imageAltText": "A String", # image alt text.
175 "id": "A String", # The ID of this link.
176 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400177 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400178 "promotionType": "A String", # Promotion Type
179 "duration": "A String", # Duration
180 "authorship": "A String", # Authorship
181 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400182 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400183 "destinationUrl": "A String", # The destination URL for the link.
184 }</pre>
185</div>
186
187<div class="method">
188 <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>
189 <pre>Retrieves all links that match the query parameters.
190
191Args:
192 role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
193 Allowed values
194 advertisers - The requester is requesting as an advertiser.
195 publishers - The requester is requesting as a publisher.
196 roleId: string, The ID of the requesting advertiser or publisher. (required)
197 linkType: string, The type of the link.
198 Allowed values
199 banner -
200 text -
201 promotionType: string, The promotion type. (repeated)
202 Allowed values
203 buy_get -
204 coupon -
205 free_gift -
206 free_gift_wrap -
207 free_shipping -
208 none -
209 ongoing -
210 percent_off -
211 price_cut -
212 product_promotion -
213 sale -
214 sweepstakes -
215 advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated)
216 pageToken: string, The value of 'nextPageToken' from the previous page. Optional.
217 relationshipStatus: string, The status of the relationship.
218 Allowed values
219 approved -
220 available -
221 maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.
222 advertiserCategory: string, The advertiser's primary vertical. (repeated)
223 Allowed values
224 apparel_accessories -
225 appliances_electronics -
226 auto_dealer -
227 automotive -
228 babies_kids -
229 blogs_personal_sites -
230 books_magazines -
231 computers -
232 dating -
233 department_stores -
234 education -
235 employment -
236 financial_credit_cards -
237 financial_other -
238 flowers_gifts -
239 grocery -
240 health_beauty -
241 home_garden -
242 hosting_domain -
243 internet_providers -
244 legal -
245 media_entertainment -
246 medical -
247 movies_games -
248 music -
249 nonprofit -
250 office_supplies -
251 online_games -
252 outdoor -
253 pets -
254 real_estate -
255 restaurants -
256 sport_fitness -
257 telecom -
258 ticketing -
259 toys_hobbies -
260 travel -
261 utilities -
262 wholesale_relationship -
263 wine_spirits -
264 authorship: string, The role of the author of the link.
265 Allowed values
266 advertiser -
267 publisher -
268 startDateMin: string, The beginning of the start date range.
269 assetSize: string, The size of the given asset. (repeated)
270 startDateMax: string, The end of the start date range.
271
272Returns:
273 An object of the form:
274
275 {
276 "nextPageToken": "A String", # The next page token.
277 "items": [ # The links.
278 { # A LinkResource.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400279 "isActive": True or False, # Flag for if this link is active.
280 "linkType": "A String", # The link type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400281 "kind": "gan#link", # The kind for one entity.
282 "endDate": "A String", # Date that this link becomes inactive.
283 "description": "A String", # Description.
284 "name": "A String", # The logical name for this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400285 "startDate": "A String", # Date that this link becomes active.
Joe Gregorio075572b2012-07-09 16:53:09 -0400286 "createDate": "A String", # Date that this link was created.
287 "imageAltText": "A String", # image alt text.
288 "id": "A String", # The ID of this link.
289 "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400290 "impressionTrackingUrl": "A String", # Tracking url for impressions.
Joe Gregorio075572b2012-07-09 16:53:09 -0400291 "promotionType": "A String", # Promotion Type
292 "duration": "A String", # Duration
293 "authorship": "A String", # Authorship
294 "availability": "A String", # Availability.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400295 "clickTrackingUrl": "A String", # Tracking url for clicks.
Joe Gregorio075572b2012-07-09 16:53:09 -0400296 "destinationUrl": "A String", # The destination URL for the link.
297 },
298 ],
299 "kind": "gan#links", # The kind for a page of links.
300 }</pre>
301</div>
302
303<div class="method">
304 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
305 <pre>Retrieves the next page of results.
306
307Args:
308 previous_request: The request for the previous page. (required)
309 previous_response: The response from the request for the previous page. (required)
310
311Returns:
312 A request object that you can call 'execute()' on to request the next
313 page. Returns None if there are no more items in the collection.
314 </pre>
315</div>
316
317</body></html>