oas_report: Run Template Reports

Description Usage Arguments Value Note Examples

Description

This function runs a precanned report that is also available via the OAS UI. Only one report is available at a time. The report_type and report_name provided will be checked against the data.frame available_reports before submitting requests, so please consult that data if unsure whether a particular report is supported.

Usage

1
2
3
4
5
6
7
oas_report(credentials, 
                      report_type, 
                      report_name, 
                      id=NULL,
                      start_date=NULL, 
                      end_date=NULL, 
                      threshold=NULL)

Arguments

credentials

a character string as returned by oas_build_credentials

report_type

a character string naming the type of report being requested

report_name

a character string naming the report name. Please see the dataset available_reports for a complete list of available report_type and report_name combinations

id

a character string that identifies one object to report on, for example a campaign id if reporting on one campaign's revenue

start_date

a character string representing a date formatted as YYYY-MM-DD of when to start the reporting from

end_date

a character string representing a date formatted as YYYY-MM-DD of when to end the reporting on

threshold

a mandatory integer when requesting Over/Under Campaign Delivery Health Status reports. Ignored otherwise.

Value

A data.frame of all fields available for the specified report name and type

Note

For Site reports the Site's Domain has to be used as the Id element (e.g. www.mysite.com)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
my_credentials <- build_credentials('myaccount', 
                                    'myusername', 
                                    'mypassword')
site_delivery_info <- oas_report(credentials=my_credentials, 
                                     report_type='Site Delivery', 
                                     report_name='Executive Summary', 
                                     id='www.mysite.com',
                                     start_date='2015-09-01', 
                                     end_date='2015-09-30')
pos_delivery_info <- oas_report(credentials=my_credentials, 
                                    report_type='Campaign Delivery',
                                    report_name='Position Delivery Information',  
                                    id='one_campaign_id')
overunder_campaigns <- oas_report(credentials=my_credentials, 
                                      report_type='Daily Health Status', 
                                      report_name='Over Delivery Campaigns', 
                                      threshold=20)

## End(Not run)

ReportMort/roas documentation built on May 9, 2019, 9:45 a.m.