tune_reporting.base.endpoints package¶
Submodules¶
tune_reporting.base.endpoints.endpoint_base module¶
TUNE Management Endpoint base¶
-
class
tune_reporting.base.endpoints.endpoint_base.
EndpointBase
(controller)[source]¶ Bases:
object
Base components for every TUNE Management API request.
The constructor.
Parameters: (string) (controller) – TUNE Management API endpoint name. -
api_key
¶ TUNE Management API KEY.
-
call
(action, query_string_dict=None)[source]¶ Call TUNE Management API service requesting response endpoint_base upon provided controller/action?query_string.
param str action: TUNE Management API endpoint’s action name. param array query_string_dict: Action’s query string parameters. return: TuneManagementResponse
-
controller
¶ TUNE Management API controller.
-
fields
(enum_fields_selection=4)[source]¶ Gather specific set of fields for this endpoint.
Parameters: int – TUNE_FIELDS_ALL, TUNE_FIELDS_DEFAULT, TUNE_FIELDS_RECOMMENDED Return (array): list endpoint fields
-
fields_recommended
¶ Property getter recommended and valid fields for an endpoint.
-
static
parse_response_report_job_id
(response)[source]¶ Helper function for parsing export response to gather job identifier.
param (TuneManagementResponse) response: return (str): Report Job identifier throws: (TuneSdkException)
-
static
parse_response_report_url
(response)[source]¶ Helper function for parsing export status response to gather report url.
param object response: TuneManagementResponse return (str): Report Url throws: TuneSdkException
-
validate_fields
= False¶
-
tune_reporting.base.endpoints.reports_actuals_endpoint_base module¶
TUNE Management Actuals Reports Endpoint base¶
-
class
tune_reporting.base.endpoints.reports_actuals_endpoint_base.
ReportsActualsEndpointBase
(controller, filter_debug_mode, filter_test_profile_id)[source]¶ Bases:
tune_reporting.base.endpoints.reports_endpoint_base.ReportsEndpointBase
Base class intended for gathering from Advertiser Stats actuals.
The constructor.
Parameters: -
count
(start_date, end_date, group=None, filter=None, response_timezone=None)[source]¶ Counts all existing records that match filter criteria and returns an array of found model data.
param str start_date: YYYY-MM-DD HH:MM:SS param str end_date: YYYY-MM-DD HH:MM:SS param str group: Group by one of more field names. param str filter: Filter the results and apply conditions that must be met for records to be included in data. param str response_timezone: Setting expected timezone for data. Default is set by account. return: (TuneManagementResponse)
-
export
(start_date, end_date, fields=None, group=None, filter=None, timestamp=None, format=None, response_timezone=None)[source]¶ Places a job into a queue to generate a report that will contain records that match provided filter criteria, and it returns a job identifier to be provided to action /export/download.json to download completed report.
param str start_date: YYYY-MM-DD HH:MM:SS param str end_date: YYYY-MM-DD HH:MM:SS param str fields: No value returns default fields, “# ” returns all available fields, or provide specific fields. param str group: Group by one of more field names. param str filter: Filter the results and apply conditions that must be met for records to be included in data. param str timestamp: Set to breakdown stats by timestamp choices: hour, datehour, date, week, month. param str format: Export format for downloaded report: choices: json, csv. param str response_timezone: Setting expected timezone for data. Default is set by account. return: (TuneManagementResponse)
-
fetch
(job_id, verbose=False, sleep=10)[source]¶ Helper function for fetching report upon completion. Starts worker for polling export queue.
param str job_id: Provided Job Identifier to reference requested report on export queue. param bool verbose: Debug purposes only to view progress of job on export queue. param int sleep: Polling delay between querying job status on export queue. return: (TuneManagementResponse)
-
find
(start_date, end_date, fields=None, group=None, filter=None, limit=None, page=None, sort=None, timestamp=None, response_timezone=None)[source]¶ Finds all existing records that match filter criteria and returns an array of found model data.
param str start_date: YYYY-MM-DD HH:MM:SS param str end_date: YYYY-MM-DD HH:MM:SS param str fields: No value returns default fields, “*” returns all available fields, or provide specific fields. param str group: Group by one of more field names. param str filter: Filter the results and apply conditions that must be met for records to be included in data. param int limit: Limit number of results, default 10. param int page: Pagination, default 1. param array sort: Sort by field name, ASC (default) or DESC param str timestamp: Set to breakdown stats by timestamp choices: hour, datehour, date, week, month. param str response_timezone: Setting expected timezone for data. Default is set by account. return: (TuneManagementResponse)
-
tune_reporting.base.endpoints.reports_endpoint_base module¶
TUNE Management Reports Endpoint base¶
-
class
tune_reporting.base.endpoints.reports_endpoint_base.
ReportsEndpointBase
(controller, filter_debug_mode, filter_test_profile_id)[source]¶ Bases:
tune_reporting.base.endpoints.endpoint_base.EndpointBase
Base components for every TUNE Management API reports.
The constructor.
Parameters:
tune_reporting.base.endpoints.reports_insights_endpoint_base module¶
TUNE Management Insights Reports Endpoint base¶
-
class
tune_reporting.base.endpoints.reports_insights_endpoint_base.
ReportsInsightEndpointBase
(controller, filter_debug_mode, filter_test_profile_id)[source]¶ Bases:
tune_reporting.base.endpoints.reports_endpoint_base.ReportsEndpointBase
Base class for handling TUNE Management API Insight stats reports.
The constructor.
Parameters: -
count
(start_date, end_date, cohort_type, cohort_interval, group, filter=None, response_timezone=None)[source]¶ Counts all existing records that match filter criteria and returns an array of found model data.
Parameters: - start_date (str) – YYYY-MM-DD HH:MM:SS
- end_date (str) – YYYY-MM-DD HH:MM:SS
- cohort_type (str) – Cohort types - click, install.
- cohort_interval (str) – Cohort intervals - year_day, year_week, year_month, year.
- group (str) – Group results using this endpoint’s fields.
- filter (str) – Filter the results and apply conditions that must be met for records to be included in data.
- response_timezone (str) – Setting expected timezone for data. Default is set by account.
Returns: TuneManagementResponse
-
static
parse_response_report_job_id
(response)[source]¶ Helper function for parsing export response to gather job identifier.
param (object) response: TuneManagementResponse return (str): Report Job identifier
-
tune_reporting.base.endpoints.reports_logs_endpoint_base module¶
TUNE Management Logs Reports Endpoint base¶
-
class
tune_reporting.base.endpoints.reports_logs_endpoint_base.
ReportsLogsEndpointBase
(controller, filter_debug_mode, filter_test_profile_id)[source]¶ Bases:
tune_reporting.base.endpoints.reports_endpoint_base.ReportsEndpointBase
Base class intended for gathering from Advertiser Stats logs.
The constructor.
Parameters: -
count
(start_date, end_date, filter=None, response_timezone=None)[source]¶ Counts all existing records that match filter criteria and returns an array of found model data.
param str start_date: YYYY-MM-DD HH:MM:SS param str end_date: YYYY-MM-DD HH:MM:SS param str filter: Filter the results and apply conditions that must be met for records to be included in data. param str response_timezone: Setting expected timezone for data. Default is set by account. return: (TuneManagementResponse)
-
export
(start_date, end_date, fields=None, filter=None, format=None, response_timezone=None)[source]¶ Places a job into a queue to generate a report that will contain records that match provided filter criteria, and it returns a job identifier to be provided to action /export/download.json to download completed report.
param str start_date: YYYY-MM-DD HH:MM:SS param str end_date: YYYY-MM-DD HH:MM:SS param str filter: Filter the results and apply conditions that must be met for records to be included in data. param str fields: No value returns default fields, “# ” returns all available fields, or provide specific fields. param str format: Export format for downloaded report: choices: json, csv. param str response_timezone: Setting expected timezone for data. Default is set by account. return: (TuneManagementResponse)
-
fetch
(job_id, verbose=False, sleep=10)[source]¶ Helper function for fetching report upon completion.
Parameters: Returns: (TuneManagementResponse)
-
find
(start_date, end_date, fields=None, filter=None, limit=None, page=None, sort=None, response_timezone=None)[source]¶ Finds all existing records that match filter criteria and returns an array of found model data.
param str start_date: YYYY-MM-DD HH:MM:SS param str end_date: YYYY-MM-DD HH:MM:SS param str filter: Filter the results and apply conditions that must be met for records to be included in data. param str fields: No value returns default fields, “*” returns all available fields, or provide specific fields. param int limit: Limit number of results, default 10. param int page: Pagination, default 1. param array sort: Sort by field name, ASC (default) or DESC param str timestamp: Set to breakdown stats by timestamp choices: hour, datehour, date, week, month. param str response_timezone: Setting expected timezone for data. Default is set by account. return: (TuneManagementResponse)
-
Module contents¶
tune management shared endpoints module