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-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves event data for a given advertiser/publisher.<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | orderId: string, Caret(^) delimited list of order IDs. Filters out all events that do not reference one of the given order IDs. Optional.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 21 | chargeType: string, Filters out all charge events that are not of the given charge type. Valid values: 'other', 'slotting_fee', 'monthly_minimum', 'tier_bonus', 'credit', 'debit'. Optional.<br> |
| 22 | Allowed values<br> |
| 23 | credit - A credit increases the publisher's payout amount and decreases the advertiser's invoice amount.<br> |
| 24 | debit - A debit reduces the publisher's payout and increases the advertiser's invoice amount.<br> |
| 25 | monthly_minimum - A payment made to Google by an advertiser as a minimum monthly network fee.<br> |
| 26 | other - Catch all. Default if unset<br> |
| 27 | slotting_fee - A one time payment made from an advertiser to a publisher.<br> |
| 28 | tier_bonus - A payment from an advertiser to a publisher for the publisher maintaining a high tier level<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 29 | linkId: string, Caret(^) delimited list of link IDs. Filters out all events that do not reference one of the given link IDs. Optional.<br> |
| 30 | advertiserId: string, Caret(^) delimited list of advertiser IDs. Filters out all events that do not reference one of the given advertiser IDs. Only used when under publishers role. Optional.<br> |
| 31 | sku: string, Caret(^) delimited list of SKUs. Filters out all events that do not reference one of the given SKU. Optional.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 32 | pp: string, A parameter<br> |
| 33 | trace: string, A parameter<br> |
| 34 | pageToken: string, The value of 'nextPageToken' from the previous page. Optional.<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 35 | roleId: string, The ID of the requesting advertiser or publisher. (required)<br> |
| 36 | productCategory: string, Caret(^) delimited list of product categories. Filters out all events that do not reference a product in one of the given product categories. Optional.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 37 | strict: string, A parameter<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 38 | role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)<br> |
| 39 | Allowed values<br> |
| 40 | advertisers - The requester is requesting as an advertiser.<br> |
| 41 | publishers - The requester is requesting as a publisher.<br> |
| 42 | modifyDateMin: string, Filters out all events modified earlier than given date. Optional. Defaults to 24 hours before the current modifyDateMax, if modifyDateMax is explicitly set.<br> |
| 43 | type: string, Filters out all events that are not of the given type. Valid values: 'action', 'transaction', 'charge'. Optional.<br> |
| 44 | Allowed values<br> |
| 45 | action - The completion of an application, sign-up, or other process. For example, an action occurs if a user clicks an ad for a credit card and completes an application for that card.<br> |
| 46 | charge - A charge event is typically a payment between an advertiser, publisher or Google.<br> |
| 47 | transaction - A conversion event, typically an e-commerce transaction. Some advertisers use a transaction to record other types of events, such as magazine subscriptions.<br> |
| 48 | status: string, Filters out all events that do not have the given status. Valid values: 'active', 'canceled'. Optional.<br> |
| 49 | Allowed values<br> |
| 50 | active - Event is currently active.<br> |
| 51 | canceled - Event is currently canceled.<br> |
| 52 | modifyDateMax: string, Filters out all events modified later than given date. Optional. Defaults to 24 hours after modifyDateMin, if modifyDateMin is explicitly set.<br> |
| 53 | eventDateMin: string, Filters out all events earlier than given date. Optional. Defaults to 24 hours from current date/time.<br> |
| 54 | maxResults: integer, Max number of offers to return in this page. Optional. Defaults to 20.<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 55 | eventDateMax: string, Filters out all events later than given date. Optional. Defaults to 24 hours after eventMin.<br> |
| 56 | memberId: string, Caret(^) delimited list of member IDs. Filters out all events that do not reference one of the given member IDs. Optional.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 57 | userip: string, A parameter<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 58 | publisherId: string, Caret(^) delimited list of publisher IDs. Filters out all events that do not reference one of the given publishers IDs. Only used when under advertiser role. Optional.<br> |
| 59 | <br> |
| 60 | Returns:<br> |
| 61 | An object of the form<br> |
| 62 | <br> |
| 63 | {<br> |
| 64 | "nextPageToken": "A String", # The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve.<br> |
| 65 | "items": [ # The event list.<br> |
| 66 | { # An EventResource.<br> |
| 67 | "networkFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the Google Affiliate Network.<br> |
| 68 | "amount": 3.14, # The amount of money.<br> |
| 69 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 70 | },<br> |
| 71 | "advertiserName": "A String", # The name of the advertiser for this event.<br> |
| 72 | "kind": "gan#event", # The kind for one event.<br> |
| 73 | "modifyDate": "A String", # The date-time this event was last modified as a <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> date-time value.<br> |
| 74 | "type": "A String", # Type of the event (action|transaction|charge).<br> |
| 75 | "orderId": "A String", # The order ID for this event. Only returned for conversion events.<br> |
| 76 | "publisherName": "A String", # The name of the publisher for this event.<br> |
| 77 | "memberId": "A String", # The ID of the member attached to this event. Only returned for conversion events.<br> |
| 78 | "advertiserId": "A String", # The ID of advertiser for this event.<br> |
| 79 | "status": "A String", # Status of the event (active|canceled). Only returned for charge and conversion events.<br> |
| 80 | "chargeId": "A String", # The charge ID for this event. Only returned for charge events.<br> |
| 81 | "products": [ # Products associated with the event.<br> |
| 82 | {<br> |
| 83 | "networkFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the Google Affiliate Network for this product.<br> |
| 84 | "amount": 3.14, # The amount of money.<br> |
| 85 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 86 | },<br> |
| 87 | "sku": "A String", # Sku of this product.<br> |
| 88 | "categoryName": "A String", # Name of the category this product belongs to.<br> |
| 89 | "skuName": "A String", # Sku name of this product.<br> |
| 90 | "publisherFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the publisehr for this product.<br> |
| 91 | "amount": 3.14, # The amount of money.<br> |
| 92 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 93 | },<br> |
| 94 | "earnings": { # An ApiMoneyProto. # Amount earned by the publisher on this product.<br> |
| 95 | "amount": 3.14, # The amount of money.<br> |
| 96 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 97 | },<br> |
| 98 | "unitPrice": { # An ApiMoneyProto. # Price per unit of this product.<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 | "categoryId": "A String", # Id of the category this product belongs to.<br> |
| 103 | "quantity": "A String", # Quantity of this product bought/exchanged.<br> |
| 104 | },<br> |
| 105 | ],<br> |
| 106 | "earnings": { # An ApiMoneyProto. # Earnings by the publisher.<br> |
| 107 | "amount": 3.14, # The amount of money.<br> |
| 108 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 109 | },<br> |
| 110 | "chargeType": "A String", # Charge type of the event (other|slotting_fee|monthly_minimum|tier_bonus|debit|credit). Only returned for charge events.<br> |
| 111 | "publisherFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the publisher.<br> |
| 112 | "amount": 3.14, # The amount of money.<br> |
| 113 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 114 | },<br> |
| 115 | "commissionableSales": { # An ApiMoneyProto. # Amount of money exchanged during the transaction. Only returned for charge and conversion events.<br> |
| 116 | "amount": 3.14, # The amount of money.<br> |
| 117 | "currencyCode": "A String", # The 3-letter code of the currency in question.<br> |
| 118 | },<br> |
| 119 | "publisherId": "A String", # The ID of the publisher for this event.<br> |
| 120 | "eventDate": "A String", # The date-time this event was initiated as a <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> date-time value.<br> |
| 121 | },<br> |
| 122 | ],<br> |
| 123 | "kind": "gan#events", # The kind for a page of events.<br> |
| 124 | }</tt></dd></dl> |
| 125 | |
| 126 | <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> |
| 127 | <br> |
| 128 | Args:<br> |
| 129 | previous_request: The request for the previous page.<br> |
| 130 | previous_response: The response from the request for the previous page.<br> |
| 131 | <br> |
| 132 | Returns:<br> |
| 133 | A request object that you can call 'execute()' on to request the next<br> |
| 134 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 135 | |
| 136 | <hr> |
| 137 | Data descriptors defined here:<br> |
| 138 | <dl><dt><strong>__dict__</strong></dt> |
| 139 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 140 | </dl> |
| 141 | <dl><dt><strong>__weakref__</strong></dt> |
| 142 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 143 | </dl> |
| 144 | </td></tr></table> |
| 145 | </body></html> |