Resource: Activity
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 uploading a video, subscribing to a channel, and adding a video to a playlist. 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 uploaded video or subscribed channel.
| JSON representation |
|---|
{
"kind": string,
"etag": string,
"id": string,
"snippet": {
"publishedAt": string,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: The fixed string |
etag |
Etag of this resource |
id |
The ID that YouTube uses to uniquely identify the activity. |
snippet |
The |
snippet.publishedAt |
The date and time that the activity occurred. The value is specified in ISO 8601 format. |
snippet.channelId |
The ID that YouTube uses to uniquely identify the channel associated with the activity. |
snippet.title |
The title of the resource primarily associated with the activity. |
snippet.description |
The description of the resource primarily associated with the activity. |
snippet.thumbnails |
A map of thumbnail images associated with the resource that is primarily associated with the activity. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. |
snippet.channelTitle |
Channel title for the channel responsible for this activity |
snippet.type |
The type of activity that the resource describes. Valid values of this enum field are:
|
contentDetails |
The |
contentDetails.upload |
The |
contentDetails.upload.videoId |
The ID that YouTube uses to uniquely identify the uploaded video. |
contentDetails.subscription |
The |
contentDetails.subscription.resourceId |
The |
contentDetails.subscription.resourceId.kind |
The type of the API resource. |
contentDetails.subscription.resourceId.videoId |
The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the |
contentDetails.subscription.resourceId.channelId |
The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the |
contentDetails.subscription.resourceId.playlistId |
The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the |
contentDetails.playlistItem |
The |
contentDetails.playlistItem.resourceId |
The |
contentDetails.playlistItem.resourceId.kind |
The type of the API resource. |
contentDetails.playlistItem.resourceId.videoId |
The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the |
contentDetails.playlistItem.resourceId.channelId |
The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the |
contentDetails.playlistItem.resourceId.playlistId |
The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the |
contentDetails.playlistItem.playlistId |
The value that YouTube uses to uniquely identify the playlist. |
contentDetails.playlistItem.playlistItemId |
ID of the item within the playlist. |
Methods |
|
|---|---|
|
Returns a list of channel activity events that match the request criteria. |