# Google Affiliate Network API . reports

## Instance Methods

Retrieves a report of the specified type.

### Method Details

`get(role, roleId, reportType, startDate=None, endDate=None, eventType=None, advertiserId=None, startIndex=None, calculateTotals=None, linkId=None, orderId=None, maxResults=None, status=None, publisherId=None)`

    Retrieves a report of the specified type.

    Args:
      role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
        Allowed values
          advertisers - The requester is requesting as an advertiser.
          publishers - The requester is requesting as a publisher.
      roleId: string, The ID of the requesting advertiser or publisher. (required)
      reportType: string, The type of report being requested. Valid values: 'order_delta'. Required. (required)
        Allowed values
          order_delta - The order delta report type.
      startDate: string, The start date (inclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day before endDate, if that is given, or yesterday. Optional.
      endDate: string, The end date (exclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day after startDate, if that is given, or today. Optional.
      eventType: string, Filters out all events that are not of the given type. Valid values: 'action', 'transaction', or 'charge'. Optional.
        Allowed values
          action - Event type is action.
          charge - Event type is charge.
          transaction - Event type is transaction.
      advertiserId: string, The IDs of the advertisers to look up, if applicable. (repeated)
      startIndex: integer, Offset on which to return results when paging. Optional.
      calculateTotals: boolean, Whether or not to calculate totals rows. Optional.
      linkId: string, Filters to capture one of given link IDs. Optional. (repeated)
      orderId: string, Filters to capture one of the given order IDs. Optional. (repeated)
      maxResults: integer, Max number of items to return in this page. Optional. Defaults to return all results.
      status: string, Filters out all events that do not have the given status. Valid values: 'active', 'canceled', or 'invalid'. Optional.
        Allowed values
          active - Event is currently active.
          canceled - Event is currently canceled.
          invalid - Event is currently invalid.
      publisherId: string, The IDs of the publishers to look up, if applicable. (repeated)

    Returns:
      An object of the form:

        { # A ReportResource representing a report of a certain type either for an advertiser or publisher.
        "totals_rows": [ # The totals rows for the report
          [ # Loop over each column in the row.
            "",
          ],
        ],
        "kind": "gan#report", # The kind for a report.
        "rows": [ # The rows of data for the report
          [ # Loop over each column in the row.
            "",
          ],
        ],
        "end_date": "A String", # The end of the date range for this report, exclusive.
        "matching_row_count": "A String", # The number of matching rows before paging is applied.
        "column_names": [ # The column names for the report
          "A String",
        ],
        "type": "A String", # The report type.
        "start_date": "A String", # The start of the date range for this report, inclusive.
      }