Joe Gregorio | 075572b | 2012-07-09 16:53:09 -0400 | [diff] [blame^] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 | |
| 94 | Args: |
| 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 | |
| 102 | Returns: |
| 103 | An object of the form: |
| 104 | |
| 105 | { # A LinkResource. |
| 106 | "startDate": "A String", # Date that this link becomes active. |
| 107 | "kind": "gan#link", # The kind for one entity. |
| 108 | "endDate": "A String", # Date that this link becomes inactive. |
| 109 | "description": "A String", # Description. |
| 110 | "name": "A String", # The logical name for this link. |
| 111 | "createDate": "A String", # Date that this link was created. |
| 112 | "imageAltText": "A String", # image alt text. |
| 113 | "id": "A String", # The ID of this link. |
| 114 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link. |
| 115 | "creativeType": "A String", # Creative Type. |
| 116 | "promotionType": "A String", # Promotion Type |
| 117 | "duration": "A String", # Duration |
| 118 | "authorship": "A String", # Authorship |
| 119 | "availability": "A String", # Availability. |
| 120 | "isActive": True or False, # Flag for if this link is active. |
| 121 | "destinationUrl": "A String", # The destination URL for the link. |
| 122 | }</pre> |
| 123 | </div> |
| 124 | |
| 125 | <div class="method"> |
| 126 | <code class="details" id="insert">insert(role, roleId, body)</code> |
| 127 | <pre>Inserts a new link. |
| 128 | |
| 129 | Args: |
| 130 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required) |
| 131 | Allowed values |
| 132 | advertisers - The requester is requesting as an advertiser. |
| 133 | publishers - The requester is requesting as a publisher. |
| 134 | roleId: string, The ID of the requesting advertiser or publisher. (required) |
| 135 | body: object, The request body. (required) |
| 136 | The object takes the form of: |
| 137 | |
| 138 | { # A LinkResource. |
| 139 | "startDate": "A String", # Date that this link becomes active. |
| 140 | "kind": "gan#link", # The kind for one entity. |
| 141 | "endDate": "A String", # Date that this link becomes inactive. |
| 142 | "description": "A String", # Description. |
| 143 | "name": "A String", # The logical name for this link. |
| 144 | "createDate": "A String", # Date that this link was created. |
| 145 | "imageAltText": "A String", # image alt text. |
| 146 | "id": "A String", # The ID of this link. |
| 147 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link. |
| 148 | "creativeType": "A String", # Creative Type. |
| 149 | "promotionType": "A String", # Promotion Type |
| 150 | "duration": "A String", # Duration |
| 151 | "authorship": "A String", # Authorship |
| 152 | "availability": "A String", # Availability. |
| 153 | "isActive": True or False, # Flag for if this link is active. |
| 154 | "destinationUrl": "A String", # The destination URL for the link. |
| 155 | } |
| 156 | |
| 157 | |
| 158 | Returns: |
| 159 | An object of the form: |
| 160 | |
| 161 | { # A LinkResource. |
| 162 | "startDate": "A String", # Date that this link becomes active. |
| 163 | "kind": "gan#link", # The kind for one entity. |
| 164 | "endDate": "A String", # Date that this link becomes inactive. |
| 165 | "description": "A String", # Description. |
| 166 | "name": "A String", # The logical name for this link. |
| 167 | "createDate": "A String", # Date that this link was created. |
| 168 | "imageAltText": "A String", # image alt text. |
| 169 | "id": "A String", # The ID of this link. |
| 170 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link. |
| 171 | "creativeType": "A String", # Creative Type. |
| 172 | "promotionType": "A String", # Promotion Type |
| 173 | "duration": "A String", # Duration |
| 174 | "authorship": "A String", # Authorship |
| 175 | "availability": "A String", # Availability. |
| 176 | "isActive": True or False, # Flag for if this link is active. |
| 177 | "destinationUrl": "A String", # The destination URL for the link. |
| 178 | }</pre> |
| 179 | </div> |
| 180 | |
| 181 | <div class="method"> |
| 182 | <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> |
| 183 | <pre>Retrieves all links that match the query parameters. |
| 184 | |
| 185 | Args: |
| 186 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required) |
| 187 | Allowed values |
| 188 | advertisers - The requester is requesting as an advertiser. |
| 189 | publishers - The requester is requesting as a publisher. |
| 190 | roleId: string, The ID of the requesting advertiser or publisher. (required) |
| 191 | linkType: string, The type of the link. |
| 192 | Allowed values |
| 193 | banner - |
| 194 | text - |
| 195 | promotionType: string, The promotion type. (repeated) |
| 196 | Allowed values |
| 197 | buy_get - |
| 198 | coupon - |
| 199 | free_gift - |
| 200 | free_gift_wrap - |
| 201 | free_shipping - |
| 202 | none - |
| 203 | ongoing - |
| 204 | percent_off - |
| 205 | price_cut - |
| 206 | product_promotion - |
| 207 | sale - |
| 208 | sweepstakes - |
| 209 | advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated) |
| 210 | pageToken: string, The value of 'nextPageToken' from the previous page. Optional. |
| 211 | relationshipStatus: string, The status of the relationship. |
| 212 | Allowed values |
| 213 | approved - |
| 214 | available - |
| 215 | maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20. |
| 216 | advertiserCategory: string, The advertiser's primary vertical. (repeated) |
| 217 | Allowed values |
| 218 | apparel_accessories - |
| 219 | appliances_electronics - |
| 220 | auto_dealer - |
| 221 | automotive - |
| 222 | babies_kids - |
| 223 | blogs_personal_sites - |
| 224 | books_magazines - |
| 225 | computers - |
| 226 | dating - |
| 227 | department_stores - |
| 228 | education - |
| 229 | employment - |
| 230 | financial_credit_cards - |
| 231 | financial_other - |
| 232 | flowers_gifts - |
| 233 | grocery - |
| 234 | health_beauty - |
| 235 | home_garden - |
| 236 | hosting_domain - |
| 237 | internet_providers - |
| 238 | legal - |
| 239 | media_entertainment - |
| 240 | medical - |
| 241 | movies_games - |
| 242 | music - |
| 243 | nonprofit - |
| 244 | office_supplies - |
| 245 | online_games - |
| 246 | outdoor - |
| 247 | pets - |
| 248 | real_estate - |
| 249 | restaurants - |
| 250 | sport_fitness - |
| 251 | telecom - |
| 252 | ticketing - |
| 253 | toys_hobbies - |
| 254 | travel - |
| 255 | utilities - |
| 256 | wholesale_relationship - |
| 257 | wine_spirits - |
| 258 | authorship: string, The role of the author of the link. |
| 259 | Allowed values |
| 260 | advertiser - |
| 261 | publisher - |
| 262 | startDateMin: string, The beginning of the start date range. |
| 263 | assetSize: string, The size of the given asset. (repeated) |
| 264 | startDateMax: string, The end of the start date range. |
| 265 | |
| 266 | Returns: |
| 267 | An object of the form: |
| 268 | |
| 269 | { |
| 270 | "nextPageToken": "A String", # The next page token. |
| 271 | "items": [ # The links. |
| 272 | { # A LinkResource. |
| 273 | "startDate": "A String", # Date that this link becomes active. |
| 274 | "kind": "gan#link", # The kind for one entity. |
| 275 | "endDate": "A String", # Date that this link becomes inactive. |
| 276 | "description": "A String", # Description. |
| 277 | "name": "A String", # The logical name for this link. |
| 278 | "createDate": "A String", # Date that this link was created. |
| 279 | "imageAltText": "A String", # image alt text. |
| 280 | "id": "A String", # The ID of this link. |
| 281 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link. |
| 282 | "creativeType": "A String", # Creative Type. |
| 283 | "promotionType": "A String", # Promotion Type |
| 284 | "duration": "A String", # Duration |
| 285 | "authorship": "A String", # Authorship |
| 286 | "availability": "A String", # Availability. |
| 287 | "isActive": True or False, # Flag for if this link is active. |
| 288 | "destinationUrl": "A String", # The destination URL for the link. |
| 289 | }, |
| 290 | ], |
| 291 | "kind": "gan#links", # The kind for a page of links. |
| 292 | }</pre> |
| 293 | </div> |
| 294 | |
| 295 | <div class="method"> |
| 296 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 297 | <pre>Retrieves the next page of results. |
| 298 | |
| 299 | Args: |
| 300 | previous_request: The request for the previous page. (required) |
| 301 | previous_response: The response from the request for the previous page. (required) |
| 302 | |
| 303 | Returns: |
| 304 | A request object that you can call 'execute()' on to request the next |
| 305 | page. Returns None if there are no more items in the collection. |
| 306 | </pre> |
| 307 | </div> |
| 308 | |
| 309 | </body></html> |