| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: class Resource</title> |
| </head><body bgcolor="#f0f0f8"> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>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.<br> |
| <br> |
| Args:<br> |
| pp: string, A parameter<br> |
| trace: string, A parameter<br> |
| roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| strict: string, A parameter<br> |
| role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| Allowed values<br> |
| advertisers - The requester is requesting as an advertiser.<br> |
| publishers - The requester is requesting as a publisher.<br> |
| linkId: string, The ID of the link to look up. (required)<br> |
| userip: string, A parameter<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| { # A LinkResource.<br> |
| "startDate": "A String", # Date that this link becomes active.<br> |
| "kind": "gan#link", # The kind for one entity.<br> |
| "endDate": "A String", # Date that this link becomes inactive.<br> |
| "description": "A String", # Description.<br> |
| "name": "A String", # The logical name for this link.<br> |
| "createDate": "A String", # Date that this link was created.<br> |
| "imageAltText": "A String", # image alt text.<br> |
| "id": "A String", # The ID of this link.<br> |
| "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| "creativeType": "A String", # Creative Type.<br> |
| "promotionType": "A String", # Promotion Type<br> |
| "duration": "A String", # Duration<br> |
| "authorship": "A String", # Authorship<br> |
| "availability": "A String", # Availability.<br> |
| "isActive": True or False, # Flag for if this link is active.<br> |
| "destinationUrl": "A String", # The destination URL for the link.<br> |
| }</tt></dd></dl> |
| |
| <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Inserts a new link.<br> |
| <br> |
| Args:<br> |
| body: object, The request body. (required)<br> |
| The object takes the form of:<br> |
| <br> |
| { # A LinkResource.<br> |
| "startDate": "A String", # Date that this link becomes active.<br> |
| "kind": "gan#link", # The kind for one entity.<br> |
| "endDate": "A String", # Date that this link becomes inactive.<br> |
| "description": "A String", # Description.<br> |
| "name": "A String", # The logical name for this link.<br> |
| "createDate": "A String", # Date that this link was created.<br> |
| "imageAltText": "A String", # image alt text.<br> |
| "id": "A String", # The ID of this link.<br> |
| "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| "creativeType": "A String", # Creative Type.<br> |
| "promotionType": "A String", # Promotion Type<br> |
| "duration": "A String", # Duration<br> |
| "authorship": "A String", # Authorship<br> |
| "availability": "A String", # Availability.<br> |
| "isActive": True or False, # Flag for if this link is active.<br> |
| "destinationUrl": "A String", # The destination URL for the link.<br> |
| }<br> |
| <br> |
| pp: string, A parameter<br> |
| trace: string, A parameter<br> |
| roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| strict: string, A parameter<br> |
| role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| Allowed values<br> |
| advertisers - The requester is requesting as an advertiser.<br> |
| publishers - The requester is requesting as a publisher.<br> |
| userip: string, A parameter<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| { # A LinkResource.<br> |
| "startDate": "A String", # Date that this link becomes active.<br> |
| "kind": "gan#link", # The kind for one entity.<br> |
| "endDate": "A String", # Date that this link becomes inactive.<br> |
| "description": "A String", # Description.<br> |
| "name": "A String", # The logical name for this link.<br> |
| "createDate": "A String", # Date that this link was created.<br> |
| "imageAltText": "A String", # image alt text.<br> |
| "id": "A String", # The ID of this link.<br> |
| "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| "creativeType": "A String", # Creative Type.<br> |
| "promotionType": "A String", # Promotion Type<br> |
| "duration": "A String", # Duration<br> |
| "authorship": "A String", # Authorship<br> |
| "availability": "A String", # Availability.<br> |
| "isActive": True or False, # Flag for if this link is active.<br> |
| "destinationUrl": "A String", # The destination URL for the link.<br> |
| }</tt></dd></dl> |
| |
| <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves all links that match the query parameters.<br> |
| <br> |
| Args:<br> |
| linkType: string, The type of the link.<br> |
| Allowed values<br> |
| banner - <br> |
| text - <br> |
| promotionType: string, The promotion type. (repeated)<br> |
| Allowed values<br> |
| buy_get - <br> |
| coupon - <br> |
| free_gift - <br> |
| free_gift_wrap - <br> |
| free_shipping - <br> |
| none - <br> |
| ongoing - <br> |
| percent_off - <br> |
| price_cut - <br> |
| product_promotion - <br> |
| sale - <br> |
| sweepstakes - <br> |
| advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated)<br> |
| pp: string, A parameter<br> |
| trace: string, A parameter<br> |
| strict: string, A parameter<br> |
| roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| pageToken: string, The value of 'nextPageToken' from the previous page. Optional.<br> |
| role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| Allowed values<br> |
| advertisers - The requester is requesting as an advertiser.<br> |
| publishers - The requester is requesting as a publisher.<br> |
| relationshipStatus: string, The status of the relationship.<br> |
| Allowed values<br> |
| approved - <br> |
| available - <br> |
| maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.<br> |
| advertiserCategory: string, The advertiser's primary vertical. (repeated)<br> |
| Allowed values<br> |
| apparel_accessories - <br> |
| appliances_electronics - <br> |
| auto_dealer - <br> |
| automotive - <br> |
| babies_kids - <br> |
| blogs_personal_sites - <br> |
| books_magazines - <br> |
| computers - <br> |
| dating - <br> |
| department_stores - <br> |
| education - <br> |
| employment - <br> |
| financial_credit_cards - <br> |
| financial_other - <br> |
| flowers_gifts - <br> |
| grocery - <br> |
| health_beauty - <br> |
| home_garden - <br> |
| hosting_domain - <br> |
| internet_providers - <br> |
| legal - <br> |
| media_entertainment - <br> |
| medical - <br> |
| movies_games - <br> |
| music - <br> |
| nonprofit - <br> |
| office_supplies - <br> |
| online_games - <br> |
| outdoor - <br> |
| pets - <br> |
| real_estate - <br> |
| restaurants - <br> |
| sport_fitness - <br> |
| telecom - <br> |
| ticketing - <br> |
| toys_hobbies - <br> |
| travel - <br> |
| utilities - <br> |
| wholesale_relationship - <br> |
| wine_spirits - <br> |
| authorship: string, The role of the author of the link.<br> |
| Allowed values<br> |
| advertiser - <br> |
| publisher - <br> |
| startDateMin: string, The beginning of the start date range.<br> |
| assetSize: string, The size of the given asset. (repeated)<br> |
| startDateMax: string, The end of the start date range.<br> |
| userip: string, A parameter<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "nextPageToken": "A String", # The next page token.<br> |
| "items": [ # The links.<br> |
| { # A LinkResource.<br> |
| "startDate": "A String", # Date that this link becomes active.<br> |
| "kind": "gan#link", # The kind for one entity.<br> |
| "endDate": "A String", # Date that this link becomes inactive.<br> |
| "description": "A String", # Description.<br> |
| "name": "A String", # The logical name for this link.<br> |
| "createDate": "A String", # Date that this link was created.<br> |
| "imageAltText": "A String", # image alt text.<br> |
| "id": "A String", # The ID of this link.<br> |
| "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| "creativeType": "A String", # Creative Type.<br> |
| "promotionType": "A String", # Promotion Type<br> |
| "duration": "A String", # Duration<br> |
| "authorship": "A String", # Authorship<br> |
| "availability": "A String", # Availability.<br> |
| "isActive": True or False, # Flag for if this link is active.<br> |
| "destinationUrl": "A String", # The destination URL for the link.<br> |
| },<br> |
| ],<br> |
| "kind": "gan#links", # The kind for a page of links.<br> |
| }</tt></dd></dl> |
| |
| <dl><dt><a name="Resource-list_next"><strong>list_next</strong></a> = methodNext(self, previous_request, previous_response)</dt><dd><tt>Retrieves the next page of results.<br> |
| <br> |
| Args:<br> |
| previous_request: The request for the previous page.<br> |
| previous_response: The response from the request for the previous page.<br> |
| <br> |
| Returns:<br> |
| A request object that you can call 'execute()' on to request the next<br> |
| page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table> |
| </body></html> |