rdfp (version 0.1.4)

dfp_getContentByStatement: ContentService

Description

Service for retrieving Content. Content entities can be targeted in video LineItems. You can query for content that belongs to a particular category or has assigned metadata. Categories and metadata for Content are stored in DFP as CustomCriteria. For example, to find all Content that is "genre=comedy", you would:

  • Retrieve the custom targeting key corresponding to "genre" using CustomTargetingService#getCustomTargetingKeysByStatement

  • Using the CustomTargetingService#getCustomTargetingValuesByStatement method and a filter like "WHERE customTargetingKeyId = :genreKeyId and name = 'comedy'", retrieve the ID for the "comedy" custom targeting value.

  • Call #getContentByStatementAndCustomTargetingValue with a filter like "WHERE status = 'ACTIVE'" and the ID of the custom targeting value from step 2.

Usage

dfp_getContentByStatement(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 getContentByStatementResponse

Details

getContentByStatement

Gets a ContentPage of Content objects that satisfy the given {@link Statement query}. The following fields are supported for filtering:

  • id

  • status

  • name

  • lastModifiedDateTime

  • lastDaiIngestDateTime

  • daiIngestStatus

See Also

Google Documentation for getContentByStatement

Examples

Run this code
# NOT RUN {
 dat <- list(filterStatement=list('query'="WHERE status='ACTIVE'")) 
 res <- dfp_getContentByStatement(dat)
# }

Run the code above in your browser using DataCamp Workspace