| |
| <!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>Returns Analytics data for a profile.<br> |
| <br> |
| Args:<br> |
| sort: string, A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.<br> |
| end_date: string, End date for fetching Analytics data. All requests should specify an end date formatted as YYYY-MM-DD. (required)<br> |
| dimensions: string, A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.<br> |
| ids: string, Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics profile ID. (required)<br> |
| metrics: string, A comma-separated list of Analytics metrics. E.g., 'ga:visits,ga:pageviews'. At least one metric must be specified. (required)<br> |
| max_results: integer, The maximum number of entries to include in this feed.<br> |
| filters: string, A comma-separated list of dimension or metric filters to be applied to Analytics data.<br> |
| segment: string, An Analytics advanced segment to be applied to data.<br> |
| start_date: string, Start date for fetching Analytics data. All requests should specify a start date formatted as YYYY-MM-DD. (required)<br> |
| start_index: integer, An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "kind": "analytics#gaData", # Resource type.<br> |
| "rows": [ # Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request.<br> |
| [<br> |
| "A String",<br> |
| ],<br> |
| ],<br> |
| "containsSampledData": True or False, # Determines if Analytics data contains samples.<br> |
| "totalResults": 42, # The total number of rows for the query, regardless of the number of rows in the response.<br> |
| "itemsPerPage": 42, # The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.<br> |
| "totalsForAllResults": { # Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request.<br> |
| },<br> |
| "nextLink": "A String", # Link to next page for this Analytics data query.<br> |
| "id": "A String", # Unique ID for this data response.<br> |
| "query": { # Analytics data request query parameters.<br> |
| "max-results": 42, # Maximum results per page.<br> |
| "sort": [ # List of dimensions or metrics based on which Analytics data is sorted.<br> |
| "A String",<br> |
| ],<br> |
| "dimensions": "A String", # List of analytics dimensions.<br> |
| "start-date": "A String", # Start date.<br> |
| "start-index": 42, # Start index.<br> |
| "segment": "A String", # Analytics advanced segment.<br> |
| "ids": "A String", # Unique table ID.<br> |
| "metrics": [ # List of analytics metrics.<br> |
| "A String",<br> |
| ],<br> |
| "filters": "A String", # Comma-separated list of dimension or metric filters.<br> |
| "end-date": "A String", # End date.<br> |
| },<br> |
| "previousLink": "A String", # Link to previous page for this Analytics data query.<br> |
| "profileInfo": { # Information for the profile, for which the Analytics data was requested.<br> |
| "webPropertyId": "A String", # Web Property ID to which this profile belongs.<br> |
| "internalWebPropertyId": "A String", # Internal ID for the web property to which this profile belongs.<br> |
| "tableId": "A String", # Table ID for profile.<br> |
| "profileId": "A String", # Profile ID.<br> |
| "profileName": "A String", # Profile name.<br> |
| "accountId": "A String", # Account ID to which this profile belongs.<br> |
| },<br> |
| "columnHeaders": [ # Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request.<br> |
| {<br> |
| "dataType": "A String", # Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc.<br> |
| "columnType": "A String", # Column Type. Either DIMENSION or METRIC.<br> |
| "name": "A String", # Column name.<br> |
| },<br> |
| ],<br> |
| "selfLink": "A String", # Link to this page.<br> |
| }</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> |