Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame^] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: class Resource</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | <p> |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 7 | <tr bgcolor="#ffc8d8"> |
| 8 | <td colspan=3 valign=bottom> <br> |
| 9 | <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> |
| 10 | |
| 11 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 12 | <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| 13 | <tr><td> </td> |
| 14 | <td width="100%">Methods defined here:<br> |
| 15 | <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| 16 | |
| 17 | <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> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | pp: string, A parameter<br> |
| 21 | trace: string, A parameter<br> |
| 22 | roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| 23 | strict: string, A parameter<br> |
| 24 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| 25 | Allowed values<br> |
| 26 | advertisers - The requester is requesting as an advertiser.<br> |
| 27 | publishers - The requester is requesting as a publisher.<br> |
| 28 | linkId: string, The ID of the link to look up. (required)<br> |
| 29 | userip: string, A parameter<br> |
| 30 | <br> |
| 31 | Returns:<br> |
| 32 | An object of the form<br> |
| 33 | <br> |
| 34 | { # A LinkResource.<br> |
| 35 | "startDate": "A String", # Date that this link becomes active.<br> |
| 36 | "kind": "gan#link", # The kind for one entity.<br> |
| 37 | "endDate": "A String", # Date that this link becomes inactive.<br> |
| 38 | "description": "A String", # Description.<br> |
| 39 | "name": "A String", # The logical name for this link.<br> |
| 40 | "createDate": "A String", # Date that this link was created.<br> |
| 41 | "imageAltText": "A String", # image alt text.<br> |
| 42 | "id": "A String", # The ID of this link.<br> |
| 43 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| 44 | "creativeType": "A String", # Creative Type.<br> |
| 45 | "promotionType": "A String", # Promotion Type<br> |
| 46 | "duration": "A String", # Duration<br> |
| 47 | "authorship": "A String", # Authorship<br> |
| 48 | "availability": "A String", # Availability.<br> |
| 49 | "isActive": True or False, # Flag for if this link is active.<br> |
| 50 | "destinationUrl": "A String", # The destination URL for the link.<br> |
| 51 | }</tt></dd></dl> |
| 52 | |
| 53 | <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Inserts a new link.<br> |
| 54 | <br> |
| 55 | Args:<br> |
| 56 | body: object, The request body. (required)<br> |
| 57 | The object takes the form of:<br> |
| 58 | <br> |
| 59 | { # A LinkResource.<br> |
| 60 | "startDate": "A String", # Date that this link becomes active.<br> |
| 61 | "kind": "gan#link", # The kind for one entity.<br> |
| 62 | "endDate": "A String", # Date that this link becomes inactive.<br> |
| 63 | "description": "A String", # Description.<br> |
| 64 | "name": "A String", # The logical name for this link.<br> |
| 65 | "createDate": "A String", # Date that this link was created.<br> |
| 66 | "imageAltText": "A String", # image alt text.<br> |
| 67 | "id": "A String", # The ID of this link.<br> |
| 68 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| 69 | "creativeType": "A String", # Creative Type.<br> |
| 70 | "promotionType": "A String", # Promotion Type<br> |
| 71 | "duration": "A String", # Duration<br> |
| 72 | "authorship": "A String", # Authorship<br> |
| 73 | "availability": "A String", # Availability.<br> |
| 74 | "isActive": True or False, # Flag for if this link is active.<br> |
| 75 | "destinationUrl": "A String", # The destination URL for the link.<br> |
| 76 | }<br> |
| 77 | <br> |
| 78 | pp: string, A parameter<br> |
| 79 | trace: string, A parameter<br> |
| 80 | roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| 81 | strict: string, A parameter<br> |
| 82 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| 83 | Allowed values<br> |
| 84 | advertisers - The requester is requesting as an advertiser.<br> |
| 85 | publishers - The requester is requesting as a publisher.<br> |
| 86 | userip: string, A parameter<br> |
| 87 | <br> |
| 88 | Returns:<br> |
| 89 | An object of the form<br> |
| 90 | <br> |
| 91 | { # A LinkResource.<br> |
| 92 | "startDate": "A String", # Date that this link becomes active.<br> |
| 93 | "kind": "gan#link", # The kind for one entity.<br> |
| 94 | "endDate": "A String", # Date that this link becomes inactive.<br> |
| 95 | "description": "A String", # Description.<br> |
| 96 | "name": "A String", # The logical name for this link.<br> |
| 97 | "createDate": "A String", # Date that this link was created.<br> |
| 98 | "imageAltText": "A String", # image alt text.<br> |
| 99 | "id": "A String", # The ID of this link.<br> |
| 100 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| 101 | "creativeType": "A String", # Creative Type.<br> |
| 102 | "promotionType": "A String", # Promotion Type<br> |
| 103 | "duration": "A String", # Duration<br> |
| 104 | "authorship": "A String", # Authorship<br> |
| 105 | "availability": "A String", # Availability.<br> |
| 106 | "isActive": True or False, # Flag for if this link is active.<br> |
| 107 | "destinationUrl": "A String", # The destination URL for the link.<br> |
| 108 | }</tt></dd></dl> |
| 109 | |
| 110 | <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> |
| 111 | <br> |
| 112 | Args:<br> |
| 113 | linkType: string, The type of the link.<br> |
| 114 | Allowed values<br> |
| 115 | banner - <br> |
| 116 | text - <br> |
| 117 | promotionType: string, The promotion type. (repeated)<br> |
| 118 | Allowed values<br> |
| 119 | buy_get - <br> |
| 120 | coupon - <br> |
| 121 | free_gift - <br> |
| 122 | free_gift_wrap - <br> |
| 123 | free_shipping - <br> |
| 124 | none - <br> |
| 125 | ongoing - <br> |
| 126 | percent_off - <br> |
| 127 | price_cut - <br> |
| 128 | product_promotion - <br> |
| 129 | sale - <br> |
| 130 | sweepstakes - <br> |
| 131 | advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated)<br> |
| 132 | pp: string, A parameter<br> |
| 133 | trace: string, A parameter<br> |
| 134 | strict: string, A parameter<br> |
| 135 | roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| 136 | pageToken: string, The value of 'nextPageToken' from the previous page. Optional.<br> |
| 137 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| 138 | Allowed values<br> |
| 139 | advertisers - The requester is requesting as an advertiser.<br> |
| 140 | publishers - The requester is requesting as a publisher.<br> |
| 141 | relationshipStatus: string, The status of the relationship.<br> |
| 142 | Allowed values<br> |
| 143 | approved - <br> |
| 144 | available - <br> |
| 145 | maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.<br> |
| 146 | advertiserCategory: string, The advertiser's primary vertical. (repeated)<br> |
| 147 | Allowed values<br> |
| 148 | apparel_accessories - <br> |
| 149 | appliances_electronics - <br> |
| 150 | auto_dealer - <br> |
| 151 | automotive - <br> |
| 152 | babies_kids - <br> |
| 153 | blogs_personal_sites - <br> |
| 154 | books_magazines - <br> |
| 155 | computers - <br> |
| 156 | dating - <br> |
| 157 | department_stores - <br> |
| 158 | education - <br> |
| 159 | employment - <br> |
| 160 | financial_credit_cards - <br> |
| 161 | financial_other - <br> |
| 162 | flowers_gifts - <br> |
| 163 | grocery - <br> |
| 164 | health_beauty - <br> |
| 165 | home_garden - <br> |
| 166 | hosting_domain - <br> |
| 167 | internet_providers - <br> |
| 168 | legal - <br> |
| 169 | media_entertainment - <br> |
| 170 | medical - <br> |
| 171 | movies_games - <br> |
| 172 | music - <br> |
| 173 | nonprofit - <br> |
| 174 | office_supplies - <br> |
| 175 | online_games - <br> |
| 176 | outdoor - <br> |
| 177 | pets - <br> |
| 178 | real_estate - <br> |
| 179 | restaurants - <br> |
| 180 | sport_fitness - <br> |
| 181 | telecom - <br> |
| 182 | ticketing - <br> |
| 183 | toys_hobbies - <br> |
| 184 | travel - <br> |
| 185 | utilities - <br> |
| 186 | wholesale_relationship - <br> |
| 187 | wine_spirits - <br> |
| 188 | authorship: string, The role of the author of the link.<br> |
| 189 | Allowed values<br> |
| 190 | advertiser - <br> |
| 191 | publisher - <br> |
| 192 | startDateMin: string, The beginning of the start date range.<br> |
| 193 | assetSize: string, The size of the given asset. (repeated)<br> |
| 194 | startDateMax: string, The end of the start date range.<br> |
| 195 | userip: string, A parameter<br> |
| 196 | <br> |
| 197 | Returns:<br> |
| 198 | An object of the form<br> |
| 199 | <br> |
| 200 | {<br> |
| 201 | "nextPageToken": "A String", # The next page token.<br> |
| 202 | "items": [ # The links.<br> |
| 203 | { # A LinkResource.<br> |
| 204 | "startDate": "A String", # Date that this link becomes active.<br> |
| 205 | "kind": "gan#link", # The kind for one entity.<br> |
| 206 | "endDate": "A String", # Date that this link becomes inactive.<br> |
| 207 | "description": "A String", # Description.<br> |
| 208 | "name": "A String", # The logical name for this link.<br> |
| 209 | "createDate": "A String", # Date that this link was created.<br> |
| 210 | "imageAltText": "A String", # image alt text.<br> |
| 211 | "id": "A String", # The ID of this link.<br> |
| 212 | "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.<br> |
| 213 | "creativeType": "A String", # Creative Type.<br> |
| 214 | "promotionType": "A String", # Promotion Type<br> |
| 215 | "duration": "A String", # Duration<br> |
| 216 | "authorship": "A String", # Authorship<br> |
| 217 | "availability": "A String", # Availability.<br> |
| 218 | "isActive": True or False, # Flag for if this link is active.<br> |
| 219 | "destinationUrl": "A String", # The destination URL for the link.<br> |
| 220 | },<br> |
| 221 | ],<br> |
| 222 | "kind": "gan#links", # The kind for a page of links.<br> |
| 223 | }</tt></dd></dl> |
| 224 | |
| 225 | <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> |
| 226 | <br> |
| 227 | Args:<br> |
| 228 | previous_request: The request for the previous page.<br> |
| 229 | previous_response: The response from the request for the previous page.<br> |
| 230 | <br> |
| 231 | Returns:<br> |
| 232 | A request object that you can call 'execute()' on to request the next<br> |
| 233 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 234 | |
| 235 | <hr> |
| 236 | Data descriptors defined here:<br> |
| 237 | <dl><dt><strong>__dict__</strong></dt> |
| 238 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 239 | </dl> |
| 240 | <dl><dt><strong>__weakref__</strong></dt> |
| 241 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 242 | </dl> |
| 243 | </td></tr></table> |
| 244 | </body></html> |