Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -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 advertiser if that the requesting advertiser/publisher has access to it. Only publishers can lookup advertisers. Advertisers can request information about themselves by omitting the advertiserId query parameter.<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| 21 | advertiserId: string, The ID of the advertiser to look up. Optional.<br> |
| 22 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| 23 | Allowed values<br> |
| 24 | advertisers - The requester is requesting as an advertiser.<br> |
| 25 | publishers - The requester is requesting as a publisher.<br> |
| 26 | <br> |
| 27 | Returns:<br> |
| 28 | An object of the form<br> |
| 29 | <br> |
| 30 | { # An AdvertiserResource.<br> |
| 31 | "category": "A String", # Category that this advertiser belongs to. A valid list of categories can be found here: <a href="http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581">http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581</a><br> |
| 32 | "productFeedsEnabled": True or False, # Allows advertisers to submit product listings to Google Product Search.<br> |
| 33 | "kind": "gan#advertiser", # The kind for an advertiser. The kind for one entity.<br> |
| 34 | "siteUrl": "A String", # URL of the website this advertiser advertises from.<br> |
| 35 | "contactPhone": "A String", # Phone that this advertiser would like publishers to contact them with.<br> |
| 36 | "description": "A String", # Description of the website the advertiser advertises from.<br> |
| 37 | "payoutRank": "A String", # A rank based on commissions paid to publishers over the past 90 days. A number between 1 and 4 where 4 means the top quartile (most money paid) and 1 means the bottom quartile (least money paid).<br> |
| 38 | "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days. Values are multiplied by 100 for display purposes.<br> |
| 39 | "amount": 3.14, # The amount of money.<br> |
| 40 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 41 | },<br> |
| 42 | "commissionDuration": 42, # The longest possible length of a commission (how long the cookies on the customer's browser last before they expire).<br> |
| 43 | "status": "A String", # The status of the requesting publisher's relationship this advertiser.<br> |
| 44 | "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months. Values are multiplied by 100 for display purposes.<br> |
| 45 | "amount": 3.14, # The amount of money.<br> |
| 46 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 47 | },<br> |
| 48 | "contactEmail": "A String", # Email that this advertiser would like publishers to contact them with.<br> |
| 49 | "item": # Object with schema name: Advertiser # The requested advertiser.<br> |
| 50 | "joinDate": "A String", # Date that this advertiser was approved as a Google Affiliate Network advertiser.<br> |
| 51 | "logoUrl": "A String", # URL to the logo this advertiser uses on the Google Affiliate Network.<br> |
| 52 | "id": "A String", # The ID of this advertiser.<br> |
| 53 | "name": "A String", # The name of this advertiser.<br> |
| 54 | }</tt></dd></dl> |
| 55 | |
| 56 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves data about all advertisers that the requesting advertiser/publisher has access to.<br> |
| 57 | <br> |
| 58 | Args:<br> |
| 59 | relationshipStatus: string, Filters out all advertisers for which do not have the given relationship status with the requesting publisher.<br> |
| 60 | Allowed values<br> |
| 61 | approved - An advertiser that has approved your application.<br> |
| 62 | available - An advertiser program that's accepting new publishers.<br> |
| 63 | deactivated - Deactivated means either the advertiser has removed you from their program, or it could also mean that you chose to remove yourself from the advertiser's program.<br> |
| 64 | declined - An advertiser that did not approve your application.<br> |
| 65 | pending - An advertiser program that you've already applied to, but they haven't yet decided to approve or decline your application.<br> |
| 66 | roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| 67 | minNinetyDayEpc: number, Filters out all advertisers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.<br> |
| 68 | advertiserCategory: string, Caret(^) delimted list of advertiser categories. Valid categories are defined here: <a href="http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581">http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581</a>. Filters out all advertisers not in one of the given advertiser categories. Optional.<br> |
| 69 | pageToken: string, The value of 'nextPageToken' from the previous page. Optional.<br> |
| 70 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| 71 | Allowed values<br> |
| 72 | advertisers - The requester is requesting as an advertiser.<br> |
| 73 | publishers - The requester is requesting as a publisher.<br> |
| 74 | maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.<br> |
| 75 | minSevenDayEpc: number, Filters out all advertisers that have a seven day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.<br> |
| 76 | minPayoutRank: integer, A value between 1 and 4, where 1 represents the quartile of advertisers with the lowest ranks and 4 represents the quartile of advertisers with the highest ranks. Filters out all advertisers with a lower rank than the given quartile. For example if a 2 was given only advertisers with a payout rank of 25 or higher would be included. Optional.<br> |
| 77 | <br> |
| 78 | Returns:<br> |
| 79 | An object of the form<br> |
| 80 | <br> |
| 81 | {<br> |
| 82 | "nextPageToken": "A String", # The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve.<br> |
| 83 | "items": [ # The advertiser list.<br> |
| 84 | { # An AdvertiserResource.<br> |
| 85 | "category": "A String", # Category that this advertiser belongs to. A valid list of categories can be found here: <a href="http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581">http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581</a><br> |
| 86 | "productFeedsEnabled": True or False, # Allows advertisers to submit product listings to Google Product Search.<br> |
| 87 | "kind": "gan#advertiser", # The kind for an advertiser. The kind for one entity.<br> |
| 88 | "siteUrl": "A String", # URL of the website this advertiser advertises from.<br> |
| 89 | "contactPhone": "A String", # Phone that this advertiser would like publishers to contact them with.<br> |
| 90 | "description": "A String", # Description of the website the advertiser advertises from.<br> |
| 91 | "payoutRank": "A String", # A rank based on commissions paid to publishers over the past 90 days. A number between 1 and 4 where 4 means the top quartile (most money paid) and 1 means the bottom quartile (least money paid).<br> |
| 92 | "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days. Values are multiplied by 100 for display purposes.<br> |
| 93 | "amount": 3.14, # The amount of money.<br> |
| 94 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 95 | },<br> |
| 96 | "commissionDuration": 42, # The longest possible length of a commission (how long the cookies on the customer's browser last before they expire).<br> |
| 97 | "status": "A String", # The status of the requesting publisher's relationship this advertiser.<br> |
| 98 | "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months. Values are multiplied by 100 for display purposes.<br> |
| 99 | "amount": 3.14, # The amount of money.<br> |
| 100 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 101 | },<br> |
| 102 | "contactEmail": "A String", # Email that this advertiser would like publishers to contact them with.<br> |
| 103 | "item": # Object with schema name: Advertiser # The requested advertiser.<br> |
| 104 | "joinDate": "A String", # Date that this advertiser was approved as a Google Affiliate Network advertiser.<br> |
| 105 | "logoUrl": "A String", # URL to the logo this advertiser uses on the Google Affiliate Network.<br> |
| 106 | "id": "A String", # The ID of this advertiser.<br> |
| 107 | "name": "A String", # The name of this advertiser.<br> |
| 108 | },<br> |
| 109 | ],<br> |
| 110 | "kind": "gan#advertisers", # The kind for a page of advertisers.<br> |
| 111 | }</tt></dd></dl> |
| 112 | |
| 113 | <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> |
| 114 | <br> |
| 115 | Args:<br> |
| 116 | previous_request: The request for the previous page.<br> |
| 117 | previous_response: The response from the request for the previous page.<br> |
| 118 | <br> |
| 119 | Returns:<br> |
| 120 | A request object that you can call 'execute()' on to request the next<br> |
| 121 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 122 | |
| 123 | <hr> |
| 124 | Data descriptors defined here:<br> |
| 125 | <dl><dt><strong>__dict__</strong></dt> |
| 126 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 127 | </dl> |
| 128 | <dl><dt><strong>__weakref__</strong></dt> |
| 129 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 130 | </dl> |
| 131 | </td></tr></table> |
| 132 | </body></html> |