YouTube Data API v3 . activities

Instance Methods

list(part, mine=None, pageToken=None, publishedBefore=None, maxResults=None, home=None, channelId=None, regionCode=None, publishedAfter=None, x__xgafv=None)

Retrieves a list of resources, possibly filtered.

list_next(previous_request, previous_response)

Retrieves the next page of results.

Method Details

list(part, mine=None, pageToken=None, publishedBefore=None, maxResults=None, home=None, channelId=None, regionCode=None, publishedAfter=None, x__xgafv=None)
Retrieves a list of resources, possibly filtered.

Args:
  part: string, The <code><strong>part</strong></code> parameter specifies a
comma-separated list of one or more <code>activity</code> resource
properties that the API response will include.<br><br>If the parameter
identifies a property that contains child properties, the child properties
will be included in the response. For example, in an <code>activity</code>
resource, the <code>snippet</code> property contains other properties that
identify the type of activity, a display title for the activity, and so
forth. If you set <code><strong>part=snippet</strong></code>, the API
response will also contain all of those nested properties. (required) (repeated)
  mine: boolean, A parameter
  pageToken: string, The <code><strong>pageToken</strong></code> parameter identifies a specific
page in the result set that should be returned. In an API response, the
<code>nextPageToken</code> and <code>prevPageToken</code> properties
identify other pages that could be retrieved.
  publishedBefore: string, A parameter
  maxResults: integer, The <code><strong>maxResults</strong></code> parameter specifies the
maximum number of items that should be returned in the result set.
  home: boolean, A parameter
  channelId: string, A parameter
  regionCode: string, A parameter
  publishedAfter: string, A parameter
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "pageInfo": { # Paging details for lists of resources, including total number of items # General pagination information.
        # available and number of resources returned in a single page.
      "resultsPerPage": 42, # The number of results included in the API response.
      "totalResults": 42, # The total number of results in the result set.
    },
    "kind": "youtube#activityListResponse", # Identifies what kind of resource this is. Value: the fixed string
        # <code>"youtube#activityListResponse"</code>.
    "visitorId": "A String", # The <code>visitorId</code> identifies the visitor.
    "nextPageToken": "A String", # The token that can be used as the value of the <code>pageToken</code>
        # parameter to retrieve the next page in the result set.
    "prevPageToken": "A String", # The token that can be used as the value of the <code>pageToken</code>
        # parameter to retrieve the previous page in the result set.
    "etag": "A String", # Etag of this resource.
    "eventId": "A String", # Serialized EventId of the request which produced this response.
    "items": [
      { # An <code><strong>activity</strong></code> 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 <code>activity</code>
          # 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.
        "id": "A String", # The ID that YouTube uses to uniquely identify the activity.
        "kind": "youtube#activity", # Identifies what kind of resource this is. Value: the fixed string
            # <code>"youtube#activity"</code>.
        "contentDetails": { # Details about the content of an activity: the video that was shared, the # The <code>contentDetails</code> object contains information about the
            # content associated with the activity. For example, if the
            # <code>snippet.type</code> value is <code>videoRated</code>, then the
            # <code>contentDetails</code> object's content identifies the rated video.
            # channel that was subscribed to, etc.
          "like": { # Information about a resource that received a positive (like) rating. # The <code>like</code> object contains information about a resource that
              # received a positive (like) rating. This property is only present if
              # the <code>snippet.type</code> is <code>like</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that identifies
                # the rated resource.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "social": { # Details about a social network post. # The <code>social</code> object contains details about a social network
              # post. This property is only present if the <code>snippet.type</code>
              # is <code>social</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object encapsulates information that
                # identifies the resource associated with a social network post.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
            "author": "A String", # The author of the social network post.
            "referenceUrl": "A String", # The URL of the social network post.
            "type": "A String", # The name of the social network.
            "imageUrl": "A String", # An image of the post's author.
          },
          "channelItem": { # Details about a resource which was added to a channel. # The <code>channelItem</code> object contains details about a resource
              # which was added to a channel. This property is only present if the
              # <code>snippet.type</code> is <code>channelItem</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that
                # identifies the resource that was added to the channel.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "recommendation": { # Information that identifies the recommended resource. # The <code>recommendation</code> object contains information about a
              # recommended resource. This property is only present if the
              # <code>snippet.type</code> is <code>recommendation</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that
                # identifies the recommended resource.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
            "reason": "A String", # The reason that the resource is recommended to the user.
            "seedResourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>seedResourceId</code> object contains information about
                # the resource that caused the recommendation.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "promotedItem": { # Details about a resource which is being promoted. # The <code>promotedItem</code> object contains details about a resource
              # which is being promoted. This property is only present if the
              # <code>snippet.type</code> is <code>promotedItem</code>.
            "ctaType": "A String", # The type of call-to-action, a message to the user indicating action that
                # can be taken.
            "impressionUrl": [ # The list of impression URLs. The client should ping all of these URLs to
                # indicate that the user was shown this promoted item.
              "A String",
            ],
            "adTag": "A String", # The URL the client should fetch to request a promoted item.
            "clickTrackingUrl": "A String", # The URL the client should ping to indicate that the user clicked through
                # on this promoted item.
            "descriptionText": "A String", # The text description to accompany the promoted item.
            "creativeViewUrl": "A String", # The URL the client should ping to indicate that the user was shown this
                # promoted item.
            "destinationUrl": "A String", # The URL the client should direct the user to, if the user chooses to
                # visit the advertiser's website.
            "videoId": "A String", # The ID that YouTube uses to uniquely identify the promoted video.
            "customCtaButtonText": "A String", # The custom call-to-action button text. If specified, it will override
                # the default button text for the cta_type.
            "forecastingUrl": [ # The list of forecasting URLs. The client should ping all of these URLs
                # when a promoted item is not available, to indicate that a promoted item
                # could have been shown.
              "A String",
            ],
          },
          "subscription": { # Information about a channel that a user subscribed to. # The <code>subscription</code> object contains information about a
              # channel that a user subscribed to. This property is only
              # present if the <code>snippet.type</code> is <code>subscription</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that
                # identifies the resource that the user subscribed to.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "favorite": { # Information about a video that was marked as a favorite video. # The <code>favorite</code> object contains information about a video that
              # was marked as a favorite video. This property is only present if the
              # <code>snippet.type</code> is <code>favorite</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that
                # identifies the resource that was marked as a favorite.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "bulletin": { # Details about a channel bulletin post. # The <code>bulletin</code> object contains details about a channel
              # bulletin post. This object is only present if the
              # <code>snippet.type</code> is <code>bulletin</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that
                # identifies the resource associated with a bulletin post.
                # @mutable youtube.activities.insert
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "comment": { # Information about a resource that received a comment. # The <code>comment</code> object contains information about a resource
              # that received a comment. This property is only present if the
              # <code>snippet.type</code> is <code>comment</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information that
                # identifies the resource associated with the comment.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
          },
          "upload": { # Information about the uploaded video. # The <code>upload</code> object contains information about the uploaded
              # video. This property is only present if the <code>snippet.type</code>
              # is <code>upload</code>.
            "videoId": "A String", # The ID that YouTube uses to uniquely identify the uploaded video.
          },
          "playlistItem": { # Information about a new playlist item. # The <code>playlistItem</code> object contains information about a
              # new playlist item. This property is only present if the
              # <code>snippet.type</code> is <code>playlistItem</code>.
            "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The <code>resourceId</code> object contains information about the
                # resource that was added to the playlist.
              "kind": "A String", # The type of the API resource.
              "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a video. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#video</code>.
              "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a channel. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#channel</code>.
              "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if
                  # that resource is a playlist. This property is only present if the
                  # <code>resourceId.kind</code> value is <code>youtube#playlist</code>.
            },
            "playlistItemId": "A String", # ID of the item within the playlist.
            "playlistId": "A String", # The value that YouTube uses to uniquely identify the playlist.
          },
        },
        "etag": "A String", # Etag of this resource
        "snippet": { # Basic details about an activity, including title, description, thumbnails, # The <code>snippet</code> object contains basic details about the
            # activity, including the activity's type and group ID.
            # activity type and group.
            # Next ID: 12
          "title": "A String", # The title of the resource primarily associated with the activity.
          "type": "A String", # The type of activity that the resource describes.
          "groupId": "A 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 <code>groupId</code> value.
          "channelId": "A String", # The ID that YouTube uses to uniquely identify the channel associated
              # with the activity.
          "channelTitle": "A String", # Channel title for the channel responsible for this activity
          "description": "A String", # The description of the resource primarily associated with the activity.
              # @mutable youtube.activities.insert
          "thumbnails": { # Internal representation of thumbnails for a YouTube resource. # 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.
            "medium": { # A thumbnail is an image representing a YouTube resource. # The medium quality image for this resource.
              "width": 42, # (Optional) Width of the thumbnail image.
              "url": "A String", # The thumbnail image's URL.
              "height": 42, # (Optional) Height of the thumbnail image.
            },
            "standard": { # A thumbnail is an image representing a YouTube resource. # The standard quality image for this resource.
              "width": 42, # (Optional) Width of the thumbnail image.
              "url": "A String", # The thumbnail image's URL.
              "height": 42, # (Optional) Height of the thumbnail image.
            },
            "default": { # A thumbnail is an image representing a YouTube resource. # The default image for this resource.
              "width": 42, # (Optional) Width of the thumbnail image.
              "url": "A String", # The thumbnail image's URL.
              "height": 42, # (Optional) Height of the thumbnail image.
            },
            "maxres": { # A thumbnail is an image representing a YouTube resource. # The maximum resolution quality image for this resource.
              "width": 42, # (Optional) Width of the thumbnail image.
              "url": "A String", # The thumbnail image's URL.
              "height": 42, # (Optional) Height of the thumbnail image.
            },
            "high": { # A thumbnail is an image representing a YouTube resource. # The high quality image for this resource.
              "width": 42, # (Optional) Width of the thumbnail image.
              "url": "A String", # The thumbnail image's URL.
              "height": 42, # (Optional) Height of the thumbnail image.
            },
          },
          "publishedAt": "A String", # The date and time that the video was uploaded. The value is specified
              # in <a href="//www.w3.org/TR/NOTE-datetime">ISO 8601</a>
              # format.
        },
      },
    ],
    "tokenPagination": { # Stub token pagination template to suppress results.
    },
  }
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.