List
|
|||||
|
|
Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Manage your YouTube account
- See, edit, and permanently delete your YouTube videos, ratings, comments and captions
- View your YouTube account
Input
This building block consumes 9 input parameters
Name | Format | Description |
---|---|---|
part Required |
STRING |
The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in an activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties |
channelId |
STRING |
The channelId parameter specifies a unique YouTube channel ID. The API will then return a list of that channel's activities |
home |
BOOLEAN |
Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user |
maxResults |
INTEGER |
The maxResults parameter specifies the maximum number of items that should be returned in the result set |
mine |
BOOLEAN |
Set this parameter's value to true to retrieve a feed of the authenticated user's activities |
pageToken |
STRING |
The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved |
publishedAfter |
DATE_TIME |
The publishedAfter parameter specifies the earliest date and time that an activity could have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be included in the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
publishedBefore |
DATE_TIME |
The publishedBefore parameter specifies the date and time before which an activity must have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be excluded from the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
regionCode |
STRING |
The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. YouTube uses this value when the authorized user's previous activity on YouTube does not provide enough information to generate the activity feed |
= Parameter name
= Format
part STRING Required The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in an activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties |
channelId STRING The channelId parameter specifies a unique YouTube channel ID. The API will then return a list of that channel's activities |
home BOOLEAN Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user |
maxResults INTEGER The maxResults parameter specifies the maximum number of items that should be returned in the result set |
mine BOOLEAN Set this parameter's value to true to retrieve a feed of the authenticated user's activities |
pageToken STRING The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved |
publishedAfter DATE_TIME The publishedAfter parameter specifies the earliest date and time that an activity could have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be included in the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
publishedBefore DATE_TIME The publishedBefore parameter specifies the date and time before which an activity must have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be excluded from the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
regionCode STRING The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. YouTube uses this value when the authorized user's previous activity on YouTube does not provide enough information to generate the activity feed |
Output
This building block provides 53 output parameters
Name | Format | Description |
---|---|---|
etag |
STRING |
Etag of this resource |
eventId |
STRING |
Serialized EventId of the request which produced this response |
items[] |
OBJECT |
An activity resource contains information about an action that a particular channel, or user, has taken on YouTube.The actions reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, commenting on a video, uploading a video, and so forth. Each activity resource identifies the type of action, the channel associated with the action, and the resource(s) associated with the action, such as the video that was rated or uploaded |
items[].contentDetails |
OBJECT |
Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc |
items[].contentDetails.bulletin |
OBJECT |
Details about a channel bulletin post |
items[].contentDetails.channelItem |
OBJECT |
Details about a resource which was added to a channel |
items[].contentDetails.comment |
OBJECT |
Information about a resource that received a comment |
items[].contentDetails.favorite |
OBJECT |
Information about a video that was marked as a favorite video |
items[].contentDetails.like |
OBJECT |
Information about a resource that received a positive (like) rating |
items[].contentDetails.playlistItem |
OBJECT |
Information about a new playlist item |
items[].contentDetails.playlistItem.playlistId |
STRING |
The value that YouTube uses to uniquely identify the playlist |
items[].contentDetails.playlistItem.playlistItemId |
STRING |
ID of the item within the playlist |
items[].contentDetails.promotedItem |
OBJECT |
Details about a resource which is being promoted |
items[].contentDetails.promotedItem.adTag |
STRING |
The URL the client should fetch to request a promoted item |
items[].contentDetails.promotedItem.clickTrackingUrl |
STRING |
The URL the client should ping to indicate that the user clicked through on this promoted item |
items[].contentDetails.promotedItem.creativeViewUrl |
STRING |
The URL the client should ping to indicate that the user was shown this promoted item |
items[].contentDetails.promotedItem.ctaType |
ENUMERATION |
The type of call-to-action, a message to the user indicating action that can be taken |
items[].contentDetails.promotedItem.customCtaButtonText |
STRING |
The custom call-to-action button text. If specified, it will override the default button text for the cta_type |
items[].contentDetails.promotedItem.descriptionText |
STRING |
The text description to accompany the promoted item |
items[].contentDetails.promotedItem.destinationUrl |
STRING |
The URL the client should direct the user to, if the user chooses to visit the advertiser's website |
items[].contentDetails.promotedItem.forecastingUrl[] |
STRING |
|
items[].contentDetails.promotedItem.impressionUrl[] |
STRING |
|
items[].contentDetails.promotedItem.videoId |
STRING |
The ID that YouTube uses to uniquely identify the promoted video |
items[].contentDetails.recommendation |
OBJECT |
Information that identifies the recommended resource |
items[].contentDetails.recommendation.reason |
ENUMERATION |
The reason that the resource is recommended to the user |
items[].contentDetails.social |
OBJECT |
Details about a social network post |
items[].contentDetails.social.author |
STRING |
The author of the social network post |
items[].contentDetails.social.imageUrl |
STRING |
An image of the post's author |
items[].contentDetails.social.referenceUrl |
STRING |
The URL of the social network post |
items[].contentDetails.social.type |
ENUMERATION |
The name of the social network |
items[].contentDetails.subscription |
OBJECT |
Information about a channel that a user subscribed to |
items[].contentDetails.upload |
OBJECT |
Information about the uploaded video |
items[].contentDetails.upload.videoId |
STRING |
The ID that YouTube uses to uniquely identify the uploaded video |
items[].etag |
STRING |
Etag of this resource |
items[].id |
STRING |
The ID that YouTube uses to uniquely identify the activity |
items[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#activity" |
items[].snippet |
OBJECT |
Basic details about an activity, including title, description, thumbnails, activity type and group |
items[].snippet.channelId |
STRING |
The ID that YouTube uses to uniquely identify the channel associated with the activity |
items[].snippet.channelTitle |
STRING |
Channel title for the channel responsible for this activity |
items[].snippet.description |
STRING |
The description of the resource primarily associated with the activity |
items[].snippet.groupId |
STRING |
The group ID associated with the activity. A group ID identifies user events that are associated with the same user and resource. For example, if a user rates a video and marks the same video as a favorite, the entries for those events would have the same group ID in the user's activity feed. In your user interface, you can avoid repetition by grouping events with the same groupId value |
items[].snippet.publishedAt |
DATE_TIME |
The date and time that the video was uploaded. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
items[].snippet.thumbnails |
OBJECT |
Internal representation of thumbnails for a YouTube resource |
items[].snippet.title |
STRING |
The title of the resource primarily associated with the activity |
items[].snippet.type |
ENUMERATION |
The type of activity that the resource describes |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#activityListResponse" |
nextPageToken |
STRING |
The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set |
pageInfo |
OBJECT |
Paging details for lists of resources, including total number of items available and number of resources returned in a single page |
pageInfo.resultsPerPage |
INTEGER |
The number of results included in the API response |
pageInfo.totalResults |
INTEGER |
The total number of results in the result set |
prevPageToken |
STRING |
The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set |
tokenPagination |
OBJECT |
Stub token pagination template to suppress results |
visitorId |
STRING |
The visitorId identifies the visitor |
= Parameter name
= Format
etag STRING Etag of this resource |
eventId STRING Serialized EventId of the request which produced this response |
items[] OBJECT An activity resource contains information about an action that a particular channel, or user, has taken on YouTube.The actions reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, commenting on a video, uploading a video, and so forth. Each activity resource identifies the type of action, the channel associated with the action, and the resource(s) associated with the action, such as the video that was rated or uploaded |
items[].contentDetails OBJECT Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc |
items[].contentDetails.bulletin OBJECT Details about a channel bulletin post |
items[].contentDetails.channelItem OBJECT Details about a resource which was added to a channel |
items[].contentDetails.comment OBJECT Information about a resource that received a comment |
items[].contentDetails.favorite OBJECT Information about a video that was marked as a favorite video |
items[].contentDetails.like OBJECT Information about a resource that received a positive (like) rating |
items[].contentDetails.playlistItem OBJECT Information about a new playlist item |
items[].contentDetails.playlistItem.playlistId STRING The value that YouTube uses to uniquely identify the playlist |
items[].contentDetails.playlistItem.playlistItemId STRING ID of the item within the playlist |
items[].contentDetails.promotedItem OBJECT Details about a resource which is being promoted |
items[].contentDetails.promotedItem.adTag STRING The URL the client should fetch to request a promoted item |
items[].contentDetails.promotedItem.clickTrackingUrl STRING The URL the client should ping to indicate that the user clicked through on this promoted item |
items[].contentDetails.promotedItem.creativeViewUrl STRING The URL the client should ping to indicate that the user was shown this promoted item |
items[].contentDetails.promotedItem.ctaType ENUMERATION The type of call-to-action, a message to the user indicating action that can be taken |
items[].contentDetails.promotedItem.customCtaButtonText STRING The custom call-to-action button text. If specified, it will override the default button text for the cta_type |
items[].contentDetails.promotedItem.descriptionText STRING The text description to accompany the promoted item |
items[].contentDetails.promotedItem.destinationUrl STRING The URL the client should direct the user to, if the user chooses to visit the advertiser's website |
items[].contentDetails.promotedItem.forecastingUrl[] STRING |
items[].contentDetails.promotedItem.impressionUrl[] STRING |
items[].contentDetails.promotedItem.videoId STRING The ID that YouTube uses to uniquely identify the promoted video |
items[].contentDetails.recommendation OBJECT Information that identifies the recommended resource |
items[].contentDetails.recommendation.reason ENUMERATION The reason that the resource is recommended to the user |
items[].contentDetails.social OBJECT Details about a social network post |
items[].contentDetails.social.author STRING The author of the social network post |
items[].contentDetails.social.imageUrl STRING An image of the post's author |
items[].contentDetails.social.referenceUrl STRING The URL of the social network post |
items[].contentDetails.social.type ENUMERATION The name of the social network |
items[].contentDetails.subscription OBJECT Information about a channel that a user subscribed to |
items[].contentDetails.upload OBJECT Information about the uploaded video |
items[].contentDetails.upload.videoId STRING The ID that YouTube uses to uniquely identify the uploaded video |
items[].etag STRING Etag of this resource |
items[].id STRING The ID that YouTube uses to uniquely identify the activity |
items[].kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#activity" |
items[].snippet OBJECT Basic details about an activity, including title, description, thumbnails, activity type and group |
items[].snippet.channelId STRING The ID that YouTube uses to uniquely identify the channel associated with the activity |
items[].snippet.channelTitle STRING Channel title for the channel responsible for this activity |
items[].snippet.description STRING The description of the resource primarily associated with the activity |
items[].snippet.groupId STRING The group ID associated with the activity. A group ID identifies user events that are associated with the same user and resource. For example, if a user rates a video and marks the same video as a favorite, the entries for those events would have the same group ID in the user's activity feed. In your user interface, you can avoid repetition by grouping events with the same groupId value |
items[].snippet.publishedAt DATE_TIME The date and time that the video was uploaded. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
items[].snippet.thumbnails OBJECT Internal representation of thumbnails for a YouTube resource |
items[].snippet.title STRING The title of the resource primarily associated with the activity |
items[].snippet.type ENUMERATION The type of activity that the resource describes |
kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#activityListResponse" |
nextPageToken STRING The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set |
pageInfo OBJECT Paging details for lists of resources, including total number of items available and number of resources returned in a single page |
pageInfo.resultsPerPage INTEGER The number of results included in the API response |
pageInfo.totalResults INTEGER The total number of results in the result set |
prevPageToken STRING The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set |
tokenPagination OBJECT Stub token pagination template to suppress results |
visitorId STRING The visitorId identifies the visitor |