# Google+ API . activities

## Instance Methods

Get an activity.

List all of the activities in the specified collection for a particular user.

Retrieves the next page of results.

Search public activities.

Retrieves the next page of results.

### Method Details

`get(activityId)`

    Get an activity.

    Args:
      activityId: string, The ID of the activity to get. (required)

    Returns:
      An object of the form:

        {
        "placeName": "A String", # Name of the place where this activity occurred.
        "kind": "plus#activity", # Identifies this resource as an activity. Value: "plus#activity".
        "updated": "A String", # The time at which this activity was last updated. Formatted as an RFC 3339 timestamp.
        "provider": { # The service provider that initially published this activity.
          "title": "A String", # Name of the service provider.
        },
        "title": "A String", # Title of this activity.
        "url": "A String", # The link to this activity.
        "geocode": "A String", # Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
        "object": { # The object of this activity.
          "resharers": { # People who reshared this activity.
            "totalItems": 42, # Total number of people who reshared this activity.
            "selfLink": "A String", # The URL for the collection of resharers.
          },
          "attachments": [ # The media objects attached to this activity.
            {
              "displayName": "A String", # The title of the attachment, such as a photo caption or an article title.
              "thumbnails": [ # If the attachment is an album, this property is a list of potential additional thumbnails from the album.
                {
                  "url": "A String", # URL to the webpage containing the image.
                  "image": { # Image resource.
                    "url": "A String", # Image url.
                    "width": 42, # The width, in pixels, of the linked resource.
                    "type": "A String", # Media type of the link.
                    "height": 42, # The height, in pixels, of the linked resource.
                  },
                  "description": "A String", # Potential name of the thumbnail.
                },
              ],
              "fullImage": { # The full image URL for photo attachments.
                "url": "A String", # URL to the image.
                "width": 42, # The width, in pixels, of the linked resource.
                "type": "A String", # Media type of the link.
                "height": 42, # The height, in pixels, of the linked resource.
              },
              "url": "A String", # The link to the attachment, should be of type text/html.
              "image": { # The preview image for photos or videos.
                "url": "A String", # Image url.
                "width": 42, # The width, in pixels, of the linked resource.
                "type": "A String", # Media type of the link.
                "height": 42, # The height, in pixels, of the linked resource.
              },
              "content": "A String", # If the attachment is an article, this property contains a snippet of text from the article. It can also include descriptions for other types.
              "embed": { # If the attachment is a video, the embeddable link.
                "url": "A String", # URL of the link.
                "type": "A String", # Media type of the link.
              },
              "id": "A String", # The ID of the attachment.
              "objectType": "A String", # The type of media object. Possible values include, but are not limited to, the following values:
                  # - "photo" - A photo.
                  # - "album" - A photo album.
                  # - "video" - A video.
                  # - "article" - An article, specified by a link.
            },
          ],
          "originalContent": "A String", # The content (text) as provided by the author, which is stored without any HTML formatting. When creating or updating an activity, this value must be supplied as plain text in the request.
          "plusoners": { # People who +1'd this activity.
            "totalItems": 42, # Total number of people who +1'd this activity.
            "selfLink": "A String", # The URL for the collection of people who +1'd this activity.
          },
          "actor": { # If this activity's object is itself another activity, such as when a person reshares an activity, this property specifies the original activity's actor.
            "url": "A String", # A link to the original actor's Google profile.
            "image": { # The image representation of the original actor.
              "url": "A String", # A URL that points to a thumbnail photo of the original actor.
            },
            "displayName": "A String", # The original actor's name, which is suitable for display.
            "id": "A String", # ID of the original actor.
          },
          "content": "A String", # The HTML-formatted content, which is suitable for display.
          "url": "A String", # The URL that points to the linked resource.
          "replies": { # Comments in reply to this activity.
            "totalItems": 42, # Total number of comments on this activity.
            "selfLink": "A String", # The URL for the collection of comments in reply to this activity.
          },
          "id": "A String", # The ID of the object. When resharing an activity, this is the ID of the activity that is being reshared.
          "objectType": "A String", # The type of the object. Possible values include, but are not limited to, the following values:
              # - "note" - Textual content.
              # - "activity" - A Google+ activity.
        },
        "placeId": "A String", # ID of the place where this activity occurred.
        "actor": { # The person who performed this activity.
          "url": "A String", # The link to the actor's Google profile.
          "image": { # The image representation of the actor.
            "url": "A String", # The URL of the actor's profile photo. To re-size the image and crop it to a square, append the query string ?sz=x, where x is the dimension in pixels of each side.
          },
          "displayName": "A String", # The name of the actor, suitable for display.
          "id": "A String", # The ID of the actor's person resource.
          "name": { # An object representation of the individual components of name.
            "givenName": "A String", # The given name (first name) of the actor.
            "familyName": "A String", # The family name (last name) of the actor.
          },
        },
        "id": "A String", # The ID of this activity.
        "access": { # Identifies who has access to see this activity.
          "items": [ # The list of access entries.
            {
              "type": "A String", # The type of entry describing to whom access is granted. Possible values are:
                  # - "person" - Access to an individual.
                  # - "circle" - Access to members of a circle.
                  # - "myCircles" - Access to members of all the person's circles.
                  # - "extendedCircles" - Access to members of everyone in a person's circles, plus all of the people in their circles.
                  # - "domain" - Access to members of the person's Google Apps domain.
                  # - "public" - Access to anyone on the web.
              "displayName": "A String", # A descriptive name for this entry. Suitable for display.
              "id": "A String", # The ID of the entry. For entries of type "person" or "circle", this is the ID of the resource. For other types, this property is not set.
            },
          ],
          "kind": "plus#acl", # Identifies this resource as a collection of access controls. Value: "plus#acl".
          "description": "A String", # Description of the access granted, suitable for display.
        },
        "verb": "A String", # This activity's verb, which indicates the action that was performed. Possible values include, but are not limited to, the following values:
            # - "post" - Publish content to the stream.
            # - "share" - Reshare an activity.
        "etag": "A String", # ETag of this response for caching purposes.
        "radius": "A String", # Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
        "location": { # The location where this activity occurred.
          "position": { # The position of the place.
            "latitude": 3.14, # The latitude of this position.
            "longitude": 3.14, # The longitude of this position.
          },
          "kind": "plus#place", # Identifies this resource as a place. Value: "plus#place".
          "displayName": "A String", # The display name of the place.
          "address": { # The physical address of the place.
            "formatted": "A String", # The formatted address for display.
          },
        },
        "address": "A String", # Street address where this activity occurred.
        "crosspostSource": "A String", # If this activity is a cross post from another system, this property specifies the ID of the original activity.
        "annotation": "A String", # Additional content added by the person who shared this activity, applicable only when resharing an activity.
        "published": "A String", # The time at which this activity was initially published. Formatted as an RFC 3339 timestamp.
      }

`list(userId, collection, pageToken=None, maxResults=None)`

    List all of the activities in the specified collection for a particular user.

    Args:
      userId: string, The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user. (required)
      collection: string, The collection of activities to list. (required)
        Allowed values
          public - All public activities created by the specified user.
      pageToken: string, The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.
      maxResults: integer, The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

    Returns:
      An object of the form:

        {
        "nextPageToken": "A String", # The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
        "kind": "plus#activityFeed", # Identifies this resource as a collection of activities. Value: "plus#activityFeed".
        "title": "A String", # The title of this collection of activities.
        "items": [ # The activities in this page of results.
          {
            "placeName": "A String", # Name of the place where this activity occurred.
            "kind": "plus#activity", # Identifies this resource as an activity. Value: "plus#activity".
            "updated": "A String", # The time at which this activity was last updated. Formatted as an RFC 3339 timestamp.
            "provider": { # The service provider that initially published this activity.
              "title": "A String", # Name of the service provider.
            },
            "title": "A String", # Title of this activity.
            "url": "A String", # The link to this activity.
            "geocode": "A String", # Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
            "object": { # The object of this activity.
              "resharers": { # People who reshared this activity.
                "totalItems": 42, # Total number of people who reshared this activity.
                "selfLink": "A String", # The URL for the collection of resharers.
              },
              "attachments": [ # The media objects attached to this activity.
                {
                  "displayName": "A String", # The title of the attachment, such as a photo caption or an article title.
                  "thumbnails": [ # If the attachment is an album, this property is a list of potential additional thumbnails from the album.
                    {
                      "url": "A String", # URL to the webpage containing the image.
                      "image": { # Image resource.
                        "url": "A String", # Image url.
                        "width": 42, # The width, in pixels, of the linked resource.
                        "type": "A String", # Media type of the link.
                        "height": 42, # The height, in pixels, of the linked resource.
                      },
                      "description": "A String", # Potential name of the thumbnail.
                    },
                  ],
                  "fullImage": { # The full image URL for photo attachments.
                    "url": "A String", # URL to the image.
                    "width": 42, # The width, in pixels, of the linked resource.
                    "type": "A String", # Media type of the link.
                    "height": 42, # The height, in pixels, of the linked resource.
                  },
                  "url": "A String", # The link to the attachment, should be of type text/html.
                  "image": { # The preview image for photos or videos.
                    "url": "A String", # Image url.
                    "width": 42, # The width, in pixels, of the linked resource.
                    "type": "A String", # Media type of the link.
                    "height": 42, # The height, in pixels, of the linked resource.
                  },
                  "content": "A String", # If the attachment is an article, this property contains a snippet of text from the article. It can also include descriptions for other types.
                  "embed": { # If the attachment is a video, the embeddable link.
                    "url": "A String", # URL of the link.
                    "type": "A String", # Media type of the link.
                  },
                  "id": "A String", # The ID of the attachment.
                  "objectType": "A String", # The type of media object. Possible values include, but are not limited to, the following values:
                      # - "photo" - A photo.
                      # - "album" - A photo album.
                      # - "video" - A video.
                      # - "article" - An article, specified by a link.
                },
              ],
              "originalContent": "A String", # The content (text) as provided by the author, which is stored without any HTML formatting. When creating or updating an activity, this value must be supplied as plain text in the request.
              "plusoners": { # People who +1'd this activity.
                "totalItems": 42, # Total number of people who +1'd this activity.
                "selfLink": "A String", # The URL for the collection of people who +1'd this activity.
              },
              "actor": { # If this activity's object is itself another activity, such as when a person reshares an activity, this property specifies the original activity's actor.
                "url": "A String", # A link to the original actor's Google profile.
                "image": { # The image representation of the original actor.
                  "url": "A String", # A URL that points to a thumbnail photo of the original actor.
                },
                "displayName": "A String", # The original actor's name, which is suitable for display.
                "id": "A String", # ID of the original actor.
              },
              "content": "A String", # The HTML-formatted content, which is suitable for display.
              "url": "A String", # The URL that points to the linked resource.
              "replies": { # Comments in reply to this activity.
                "totalItems": 42, # Total number of comments on this activity.
                "selfLink": "A String", # The URL for the collection of comments in reply to this activity.
              },
              "id": "A String", # The ID of the object. When resharing an activity, this is the ID of the activity that is being reshared.
              "objectType": "A String", # The type of the object. Possible values include, but are not limited to, the following values:
                  # - "note" - Textual content.
                  # - "activity" - A Google+ activity.
            },
            "placeId": "A String", # ID of the place where this activity occurred.
            "actor": { # The person who performed this activity.
              "url": "A String", # The link to the actor's Google profile.
              "image": { # The image representation of the actor.
                "url": "A String", # The URL of the actor's profile photo. To re-size the image and crop it to a square, append the query string ?sz=x, where x is the dimension in pixels of each side.
              },
              "displayName": "A String", # The name of the actor, suitable for display.
              "id": "A String", # The ID of the actor's person resource.
              "name": { # An object representation of the individual components of name.
                "givenName": "A String", # The given name (first name) of the actor.
                "familyName": "A String", # The family name (last name) of the actor.
              },
            },
            "id": "A String", # The ID of this activity.
            "access": { # Identifies who has access to see this activity.
              "items": [ # The list of access entries.
                {
                  "type": "A String", # The type of entry describing to whom access is granted. Possible values are:
                      # - "person" - Access to an individual.
                      # - "circle" - Access to members of a circle.
                      # - "myCircles" - Access to members of all the person's circles.
                      # - "extendedCircles" - Access to members of everyone in a person's circles, plus all of the people in their circles.
                      # - "domain" - Access to members of the person's Google Apps domain.
                      # - "public" - Access to anyone on the web.
                  "displayName": "A String", # A descriptive name for this entry. Suitable for display.
                  "id": "A String", # The ID of the entry. For entries of type "person" or "circle", this is the ID of the resource. For other types, this property is not set.
                },
              ],
              "kind": "plus#acl", # Identifies this resource as a collection of access controls. Value: "plus#acl".
              "description": "A String", # Description of the access granted, suitable for display.
            },
            "verb": "A String", # This activity's verb, which indicates the action that was performed. Possible values include, but are not limited to, the following values:
                # - "post" - Publish content to the stream.
                # - "share" - Reshare an activity.
            "etag": "A String", # ETag of this response for caching purposes.
            "radius": "A String", # Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
            "location": { # The location where this activity occurred.
              "position": { # The position of the place.
                "latitude": 3.14, # The latitude of this position.
                "longitude": 3.14, # The longitude of this position.
              },
              "kind": "plus#place", # Identifies this resource as a place. Value: "plus#place".
              "displayName": "A String", # The display name of the place.
              "address": { # The physical address of the place.
                "formatted": "A String", # The formatted address for display.
              },
            },
            "address": "A String", # Street address where this activity occurred.
            "crosspostSource": "A String", # If this activity is a cross post from another system, this property specifies the ID of the original activity.
            "annotation": "A String", # Additional content added by the person who shared this activity, applicable only when resharing an activity.
            "published": "A String", # The time at which this activity was initially published. Formatted as an RFC 3339 timestamp.
          },
        ],
        "updated": "A String", # The time at which this collection of activities was last updated. Formatted as an RFC 3339 timestamp.
        "nextLink": "A String", # Link to the next page of activities.
        "etag": "A String", # ETag of this response for caching purposes.
        "id": "A String", # The ID of this collection of activities. Deprecated.
        "selfLink": "A String", # Link to this activity resource.
      }

`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.

`search(query, orderBy=None, language=None, pageToken=None, maxResults=None)`

    Search public activities.

    Args:
      query: string, Full-text search query string. (required)
      orderBy: string, Specifies how to order search results.
        Allowed values
          best - Sort activities by relevance to the user, most relevant first.
          recent - Sort activities by published date, most recent first.
      language: string, Specify the preferred language to search with. See search language codes for available values.
      pageToken: string, The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. This token can be of any length.
      maxResults: integer, The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

    Returns:
      An object of the form:

        {
        "nextPageToken": "A String", # The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
        "kind": "plus#activityFeed", # Identifies this resource as a collection of activities. Value: "plus#activityFeed".
        "title": "A String", # The title of this collection of activities.
        "items": [ # The activities in this page of results.
          {
            "placeName": "A String", # Name of the place where this activity occurred.
            "kind": "plus#activity", # Identifies this resource as an activity. Value: "plus#activity".
            "updated": "A String", # The time at which this activity was last updated. Formatted as an RFC 3339 timestamp.
            "provider": { # The service provider that initially published this activity.
              "title": "A String", # Name of the service provider.
            },
            "title": "A String", # Title of this activity.
            "url": "A String", # The link to this activity.
            "geocode": "A String", # Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
            "object": { # The object of this activity.
              "resharers": { # People who reshared this activity.
                "totalItems": 42, # Total number of people who reshared this activity.
                "selfLink": "A String", # The URL for the collection of resharers.
              },
              "attachments": [ # The media objects attached to this activity.
                {
                  "displayName": "A String", # The title of the attachment, such as a photo caption or an article title.
                  "thumbnails": [ # If the attachment is an album, this property is a list of potential additional thumbnails from the album.
                    {
                      "url": "A String", # URL to the webpage containing the image.
                      "image": { # Image resource.
                        "url": "A String", # Image url.
                        "width": 42, # The width, in pixels, of the linked resource.
                        "type": "A String", # Media type of the link.
                        "height": 42, # The height, in pixels, of the linked resource.
                      },
                      "description": "A String", # Potential name of the thumbnail.
                    },
                  ],
                  "fullImage": { # The full image URL for photo attachments.
                    "url": "A String", # URL to the image.
                    "width": 42, # The width, in pixels, of the linked resource.
                    "type": "A String", # Media type of the link.
                    "height": 42, # The height, in pixels, of the linked resource.
                  },
                  "url": "A String", # The link to the attachment, should be of type text/html.
                  "image": { # The preview image for photos or videos.
                    "url": "A String", # Image url.
                    "width": 42, # The width, in pixels, of the linked resource.
                    "type": "A String", # Media type of the link.
                    "height": 42, # The height, in pixels, of the linked resource.
                  },
                  "content": "A String", # If the attachment is an article, this property contains a snippet of text from the article. It can also include descriptions for other types.
                  "embed": { # If the attachment is a video, the embeddable link.
                    "url": "A String", # URL of the link.
                    "type": "A String", # Media type of the link.
                  },
                  "id": "A String", # The ID of the attachment.
                  "objectType": "A String", # The type of media object. Possible values include, but are not limited to, the following values:
                      # - "photo" - A photo.
                      # - "album" - A photo album.
                      # - "video" - A video.
                      # - "article" - An article, specified by a link.
                },
              ],
              "originalContent": "A String", # The content (text) as provided by the author, which is stored without any HTML formatting. When creating or updating an activity, this value must be supplied as plain text in the request.
              "plusoners": { # People who +1'd this activity.
                "totalItems": 42, # Total number of people who +1'd this activity.
                "selfLink": "A String", # The URL for the collection of people who +1'd this activity.
              },
              "actor": { # If this activity's object is itself another activity, such as when a person reshares an activity, this property specifies the original activity's actor.
                "url": "A String", # A link to the original actor's Google profile.
                "image": { # The image representation of the original actor.
                  "url": "A String", # A URL that points to a thumbnail photo of the original actor.
                },
                "displayName": "A String", # The original actor's name, which is suitable for display.
                "id": "A String", # ID of the original actor.
              },
              "content": "A String", # The HTML-formatted content, which is suitable for display.
              "url": "A String", # The URL that points to the linked resource.
              "replies": { # Comments in reply to this activity.
                "totalItems": 42, # Total number of comments on this activity.
                "selfLink": "A String", # The URL for the collection of comments in reply to this activity.
              },
              "id": "A String", # The ID of the object. When resharing an activity, this is the ID of the activity that is being reshared.
              "objectType": "A String", # The type of the object. Possible values include, but are not limited to, the following values:
                  # - "note" - Textual content.
                  # - "activity" - A Google+ activity.
            },
            "placeId": "A String", # ID of the place where this activity occurred.
            "actor": { # The person who performed this activity.
              "url": "A String", # The link to the actor's Google profile.
              "image": { # The image representation of the actor.
                "url": "A String", # The URL of the actor's profile photo. To re-size the image and crop it to a square, append the query string ?sz=x, where x is the dimension in pixels of each side.
              },
              "displayName": "A String", # The name of the actor, suitable for display.
              "id": "A String", # The ID of the actor's person resource.
              "name": { # An object representation of the individual components of name.
                "givenName": "A String", # The given name (first name) of the actor.
                "familyName": "A String", # The family name (last name) of the actor.
              },
            },
            "id": "A String", # The ID of this activity.
            "access": { # Identifies who has access to see this activity.
              "items": [ # The list of access entries.
                {
                  "type": "A String", # The type of entry describing to whom access is granted. Possible values are:
                      # - "person" - Access to an individual.
                      # - "circle" - Access to members of a circle.
                      # - "myCircles" - Access to members of all the person's circles.
                      # - "extendedCircles" - Access to members of everyone in a person's circles, plus all of the people in their circles.
                      # - "domain" - Access to members of the person's Google Apps domain.
                      # - "public" - Access to anyone on the web.
                  "displayName": "A String", # A descriptive name for this entry. Suitable for display.
                  "id": "A String", # The ID of the entry. For entries of type "person" or "circle", this is the ID of the resource. For other types, this property is not set.
                },
              ],
              "kind": "plus#acl", # Identifies this resource as a collection of access controls. Value: "plus#acl".
              "description": "A String", # Description of the access granted, suitable for display.
            },
            "verb": "A String", # This activity's verb, which indicates the action that was performed. Possible values include, but are not limited to, the following values:
                # - "post" - Publish content to the stream.
                # - "share" - Reshare an activity.
            "etag": "A String", # ETag of this response for caching purposes.
            "radius": "A String", # Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
            "location": { # The location where this activity occurred.
              "position": { # The position of the place.
                "latitude": 3.14, # The latitude of this position.
                "longitude": 3.14, # The longitude of this position.
              },
              "kind": "plus#place", # Identifies this resource as a place. Value: "plus#place".
              "displayName": "A String", # The display name of the place.
              "address": { # The physical address of the place.
                "formatted": "A String", # The formatted address for display.
              },
            },
            "address": "A String", # Street address where this activity occurred.
            "crosspostSource": "A String", # If this activity is a cross post from another system, this property specifies the ID of the original activity.
            "annotation": "A String", # Additional content added by the person who shared this activity, applicable only when resharing an activity.
            "published": "A String", # The time at which this activity was initially published. Formatted as an RFC 3339 timestamp.
          },
        ],
        "updated": "A String", # The time at which this collection of activities was last updated. Formatted as an RFC 3339 timestamp.
        "nextLink": "A String", # Link to the next page of activities.
        "etag": "A String", # ETag of this response for caching purposes.
        "id": "A String", # The ID of this collection of activities. Deprecated.
        "selfLink": "A String", # Link to this activity resource.
      }

`search_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.