141 lines
19 KiB
HTML
141 lines
19 KiB
HTML
|
|
<!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-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves event data for a given advertiser/publisher.<br>
|
|
<br>
|
|
Args:<br>
|
|
orderId: string, Caret(^) delimited list of order IDs. Filters out all events that do not reference one of the given order IDs. Optional.<br>
|
|
linkId: string, Caret(^) delimited list of link IDs. Filters out all events that do not reference one of the given link IDs. Optional.<br>
|
|
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>
|
|
sku: string, Caret(^) delimited list of SKUs. Filters out all events that do not reference one of the given SKU. Optional.<br>
|
|
roleId: string, The ID of the requesting advertiser or publisher. (required)<br>
|
|
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>
|
|
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>
|
|
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>
|
|
type: string, Filters out all events that are not of the given type. Valid values: 'action', 'transaction', 'charge'. Optional.<br>
|
|
Allowed values<br>
|
|
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>
|
|
charge - A charge event is typically a payment between an advertiser, publisher or Google.<br>
|
|
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>
|
|
status: string, Filters out all events that do not have the given status. Valid values: 'active', 'canceled'. Optional.<br>
|
|
Allowed values<br>
|
|
active - Event is currently active.<br>
|
|
canceled - Event is currently canceled.<br>
|
|
modifyDateMax: string, Filters out all events modified later than given date. Optional. Defaults to 24 hours after modifyDateMin, if modifyDateMin is explicitly set.<br>
|
|
eventDateMin: string, Filters out all events earlier than given date. Optional. Defaults to 24 hours from current date/time.<br>
|
|
maxResults: integer, Max number of offers to return in this page. Optional. Defaults to 20.<br>
|
|
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>
|
|
Allowed values<br>
|
|
credit - A credit increases the publisher's payout amount and decreases the advertiser's invoice amount.<br>
|
|
debit - A debit reduces the publisher's payout and increases the advertiser's invoice amount.<br>
|
|
monthly_minimum - A payment made to Google by an advertiser as a minimum monthly network fee.<br>
|
|
other - Catch all. Default if unset<br>
|
|
slotting_fee - A one time payment made from an advertiser to a publisher.<br>
|
|
tier_bonus - A payment from an advertiser to a publisher for the publisher maintaining a high tier level<br>
|
|
eventDateMax: string, Filters out all events later than given date. Optional. Defaults to 24 hours after eventMin.<br>
|
|
memberId: string, Caret(^) delimited list of member IDs. Filters out all events that do not reference one of the given member IDs. Optional.<br>
|
|
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>
|
|
<br>
|
|
Returns:<br>
|
|
An object of the form<br>
|
|
<br>
|
|
{<br>
|
|
"nextPageToken": "A String", # The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve.<br>
|
|
"items": [ # The event list.<br>
|
|
{ # An EventResource.<br>
|
|
"networkFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the Google Affiliate Network.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"advertiserName": "A String", # The name of the advertiser for this event.<br>
|
|
"kind": "gan#event", # The kind for one event.<br>
|
|
"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>
|
|
"type": "A String", # Type of the event (action|transaction|charge).<br>
|
|
"orderId": "A String", # The order ID for this event. Only returned for conversion events.<br>
|
|
"publisherName": "A String", # The name of the publisher for this event.<br>
|
|
"memberId": "A String", # The ID of the member attached to this event. Only returned for conversion events.<br>
|
|
"advertiserId": "A String", # The ID of advertiser for this event.<br>
|
|
"status": "A String", # Status of the event (active|canceled). Only returned for charge and conversion events.<br>
|
|
"chargeId": "A String", # The charge ID for this event. Only returned for charge events.<br>
|
|
"products": [ # Products associated with the event.<br>
|
|
{<br>
|
|
"networkFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the Google Affiliate Network for this product.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"sku": "A String", # Sku of this product.<br>
|
|
"categoryName": "A String", # Name of the category this product belongs to.<br>
|
|
"skuName": "A String", # Sku name of this product.<br>
|
|
"publisherFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the publisehr for this product.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"earnings": { # An ApiMoneyProto. # Amount earned by the publisher on this product.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"unitPrice": { # An ApiMoneyProto. # Price per unit of this product.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"categoryId": "A String", # Id of the category this product belongs to.<br>
|
|
"quantity": "A String", # Quantity of this product bought/exchanged.<br>
|
|
},<br>
|
|
],<br>
|
|
"earnings": { # An ApiMoneyProto. # Earnings by the publisher.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"chargeType": "A String", # Charge type of the event (other|slotting_fee|monthly_minimum|tier_bonus|debit|credit). Only returned for charge events.<br>
|
|
"publisherFee": { # An ApiMoneyProto. # Fee that the advertiser paid to the publisher.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"commissionableSales": { # An ApiMoneyProto. # Amount of money exchanged during the transaction. Only returned for charge and conversion events.<br>
|
|
"amount": 3.14, # The amount of money.<br>
|
|
"currencyCode": "A String", # The 3-letter code of the currency in question.<br>
|
|
},<br>
|
|
"publisherId": "A String", # The ID of the publisher for this event.<br>
|
|
"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>
|
|
},<br>
|
|
],<br>
|
|
"kind": "gan#events", # The kind for a page of events.<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> |