Resource: Campaign
A campaign
resource represents a specific content owner campaign
, which allows the content owner to use annotations to promote content on claimed, user-uploaded videos. For example, a content owner could create a campaign that adds links to a movie's watch page for any claimed, user-uploaded videos that contain scenes from that movie. A YouTube content owner can create up to 5000 campaigns.
JSON representation |
---|
{
"kind"
:
string
,
"status"
:
string
,
"campaignData"
:
{
object (
|
Fields | |
---|---|
kind
|
The type of the API resource. For |
status
|
The status of the campaign. |
campaignData
|
The |
timeCreated
|
The time the campaign was created. |
timeLastModified
|
The time the campaign was last modified. |
id
|
The unique ID that YouTube uses to identify the campaign. |
CampaignData
This object contains detail information about a campaign such as the start and end date, the target and the source of a campaign.
JSON representation |
---|
{ "name" : string , "startTime" : string , "expireTime" : string , "campaignSource" : { object ( |
Fields | |
---|---|
name
|
The user-given name of the campaign. |
startTime
|
The time at which the campaign should start. Do not specify a value if the campaign should start immediately. |
expireTime
|
The time at which the campaign should expire. Do not specify a value if the campaign has no expiration time. |
campaignSource
|
The |
promotedContent[]
|
A list of videos or channels that will be linked to from claimed videos that are included in the campaign. |
CampaignSource
A campaignSource
resource contains the type and values of the sources for a campaign that determine which videos will be promoted with promotional content.
JSON representation |
---|
{ "sourceType" : string , "sourceValue" : [ string ] } |
Fields | |
---|---|
sourceType
|
The type of the campaign source. |
sourceValue[]
|
A list of values of the campaign source. |
PromotedContent
This object contains the links as the promotional target of a campaign.
JSON representation |
---|
{
"link"
:
[
{
object (
|
Fields | |
---|---|
link[]
|
A list of link targets that will be used to generate the annotation link that appears on videos included in the campaign . If more than one link is specified, the link that is displayed to viewers will be randomly selected from the list. |
CampaignTargetLink
This object contains the type and target id of the link as the promotional target of a campaign..
JSON representation |
---|
{ "targetType" : string , "targetId" : string } |
Fields | |
---|---|
targetType
|
Indicates whether the link target is a channel or video. |
targetId
|
The channel ID or video ID of the link target. |
Methods |
|
---|---|
|
Deletes a specified campaign for an owner. |
|
Retrieves a particular campaign for an owner. |
|
Insert a new campaign for an owner using the specified campaign data. |
|
Retrieves a list of campaigns for an owner. |
|
Patch the data for a specific campaign. |
|
Update the data for a specific campaign. |