rdfp (version 0.1.4)

dfp_getAvailabilityForecast: ForecastService

Description

Provides methods for estimating traffic (clicks/impressions) for line items. Forecasts can be provided for LineItem objects that exist in the system or which have not had an ID set yet.

Usage

dfp_getAvailabilityForecast(request_data, as_df = TRUE,
  verbose = FALSE)

Arguments

request_data

a list or data.frame of data elements to be formatted for a SOAP request (XML format, but passed as character string)

as_df

a boolean indicating whether to attempt to parse the result into a data.frame

verbose

a boolean indicating whether to print the service URL and POSTed XML

Value

a data.frame or list containing all the elements of a getAvailabilityForecastResponse

Details

Test Network Behavior

Test networks are unable to provide forecasts that would be comparable to the production environment because forecasts require traffic history. Visit the See Also section below to proceed to Google and review the details.'

getAvailabilityForecast

Gets the availability forecast for a ProspectiveLineItem. An availability forecast reports the maximum number of available units that the line item can book, and the total number of units matching the line item's targeting.

See Also

Google Documentation for getAvailabilityForecast

Examples

Run this code
# NOT RUN {
filter <- "WHERE Status='DELIVERING' LIMIT 1"
one_li <- dfp_getLineItemsByStatement(list(filterStatement=list(query=filter)))[[1]]
hypothetical_line_item <- list(lineItem=
                               list(id=one_li$id,
                                    startDateTime=one_li$startDateTime,
                                    endDateTime=dfp_date_to_list(Sys.Date()+100),
                                    lineItemType=one_li$lineItemType,
                                    costType=one_li$costType, 
                                    primaryGoal=one_li$primaryGoal, 
                                    targeting=one_li$targeting))
request_data <- list(lineItem=hypothetical_line_item,
                     forecastOptions=list(includeTargetingCriteriaBreakdown='true', 
                                          includeContendingLineItems='true'))
dfp_getAvailabilityForecast_result <- dfp_getAvailabilityForecast(request_data)
# }

Run the code above in your browser using DataCamp Workspace