oas_list_code: List Code Items from API Database

Description Usage Arguments Value Examples

Description

This function returns a data.frame listing codes associated to a particular field on an object in Xaxis for Publishers. Certain search criteria may be added to the request to narrow the results returned. This function is very similar to list_request; however it is specifically for returning code maps.

Usage

1
2
3
4
5
6
7
8
9
oas_list_code(credentials, 
                         code_type=c('Bandwidth', 'Browser', 'BrowserV', 'Continent',
                                     'Country', 'City', 'State', 'DMA', 'MSA', 
                                     'EventType', 'HourOfDay', 'WeekDay',
                                     'Omniture', 'OS', 'Position',
                                     'TopDomain', 'Zone', 'Carrier', 
                                     'DeviceGroup', 'Device', 'Manufacturer'),
                         search_criteria_attributes = c(pageIndex="-1", pageSize="1000"),
                         search_criteria = NULL, verbose = FALSE)

Arguments

credentials

a character string as returned by oas_build_credentials

code_type

a character string in one of the supported code types for the API database list action

search_criteria_attributes

a named character vector of attributes to add to the SearchCriteria node. Acceptable parameters are pageSize and pageIndex to support paginated requests. Default pageSize for request types Campaign, CampaignGroup, and Creatives is: 30,000, while all others have a default pageSize of 1000.

search_criteria

an XML document specifying the children to be added to the SearchCriteria Node in the request

verbose

a boolean indicating whether to print the request XML as a message

Value

A data.frame listing all objects of the specified type that also met the supplied search criteria

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
my_credentials <- build_credentials('myaccount', 
                                    'myusername', 
                                    'mypassword')
                                    
country_criteria_node = newXMLNode("Country", parent = search_criteria_node)
country_code_node = newXMLNode("Code", "US", parent = country_criteria_node)
us_city_codes <- oas_list_code(credentials=my_credentials, code_type='City', 
                                   search_criteria_attributes = c(pageSize="20000"), 
                                   search_criteria=list(country_code_node))

## End(Not run)

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