# 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.
        "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).
              "contentsource": { # If the attachment is audio, the link to the content.
                "url": "A String", # URL of the link.
                "type": "A String", # Media type of the link.
              },
              "fullImage": { # The full image url for photo attachments.
                "url": "A String", # URL of the link.
                "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", # URL of the link.
                "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.
              "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 media object's resource.
              "categories": [ # Specifies zero or more categories the attachment belongs to.
                {
                  "term": "A String", # The tag, e.g. album.
                  "schema": "A String", # Domain of schema, e.g. http://google.com.
                  "label": "A String", # The category label, suitable for display (e.g. "album cover").
                },
              ],
              "objectType": "A String", # The type of media object. Possible values are:
                  # - "photo" - A photo.
                  # - "video" - A video.
                  # - "article" - An article, specified by a link.
            },
          ],
          "originalContent": "A String", # The content (text) as provided by the author, stored without any HTML formatting. When updating an activity's content, use the value of originalContent as the starting point from which to make edits.
          "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 (for example, 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, suitable for display.
            "id": "A String", # ID of the original actor.
          },
          "content": "A String", # The HTML-formatted content, suitable for display. When creating or updating an activity, this value must be supplied as plain text in the request. If successful, the response will contain the HTML-formatted content. When updating an activity, use originalContent as the starting value, then assign the updated text to this property.
          "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 being reshared.
          "objectType": "A String", # The type of the object. Possible values are:
              # - "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.
        },
        "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.
                  # - "public" - Access to anyone on the web.
              "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, indicating what action was performed. Possible values are:
            # - "post" - Publish content to the stream.
            # - "checkin" - Check in to a location.
            # - "share" - Reshare an activity.
        "geocode": "A String", # Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
        "radius": "A String", # Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
        "address": "A String", # Street address where this activity occurred.
        "crosspostSource": "A String", # If this activity is a crosspost from another system, this property specifies the ID of the original activity.
        "placeholder": True or False, # True if this activity is a placeholder.
        "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, 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, used for paging. For any response, the actual number returned may be less than the specified maxResults.

    Returns:
      An object of the form:

        {
        "nextPageToken": "A String", # The continuation token, 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.
            "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).
                  "contentsource": { # If the attachment is audio, the link to the content.
                    "url": "A String", # URL of the link.
                    "type": "A String", # Media type of the link.
                  },
                  "fullImage": { # The full image url for photo attachments.
                    "url": "A String", # URL of the link.
                    "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", # URL of the link.
                    "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.
                  "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 media object's resource.
                  "categories": [ # Specifies zero or more categories the attachment belongs to.
                    {
                      "term": "A String", # The tag, e.g. album.
                      "schema": "A String", # Domain of schema, e.g. http://google.com.
                      "label": "A String", # The category label, suitable for display (e.g. "album cover").
                    },
                  ],
                  "objectType": "A String", # The type of media object. Possible values are:
                      # - "photo" - A photo.
                      # - "video" - A video.
                      # - "article" - An article, specified by a link.
                },
              ],
              "originalContent": "A String", # The content (text) as provided by the author, stored without any HTML formatting. When updating an activity's content, use the value of originalContent as the starting point from which to make edits.
              "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 (for example, 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, suitable for display.
                "id": "A String", # ID of the original actor.
              },
              "content": "A String", # The HTML-formatted content, suitable for display. When creating or updating an activity, this value must be supplied as plain text in the request. If successful, the response will contain the HTML-formatted content. When updating an activity, use originalContent as the starting value, then assign the updated text to this property.
              "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 being reshared.
              "objectType": "A String", # The type of the object. Possible values are:
                  # - "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.
            },
            "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.
                      # - "public" - Access to anyone on the web.
                  "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, indicating what action was performed. Possible values are:
                # - "post" - Publish content to the stream.
                # - "checkin" - Check in to a location.
                # - "share" - Reshare an activity.
            "geocode": "A String", # Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
            "radius": "A String", # Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
            "address": "A String", # Street address where this activity occurred.
            "crosspostSource": "A String", # If this activity is a crosspost from another system, this property specifies the ID of the original activity.
            "placeholder": True or False, # True if this activity is a placeholder.
            "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.
        "id": "A String", # The ID of this collection of activities.
        "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 Language Codes for available values.
      pageToken: string, The continuation token, 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 may be of any length.
      maxResults: integer, The maximum number of activities to include in the response, used for paging. For any response, the actual number returned may be less than the specified maxResults.

    Returns:
      An object of the form:

        {
        "nextPageToken": "A String", # The continuation token, 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.
            "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).
                  "contentsource": { # If the attachment is audio, the link to the content.
                    "url": "A String", # URL of the link.
                    "type": "A String", # Media type of the link.
                  },
                  "fullImage": { # The full image url for photo attachments.
                    "url": "A String", # URL of the link.
                    "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", # URL of the link.
                    "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.
                  "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 media object's resource.
                  "categories": [ # Specifies zero or more categories the attachment belongs to.
                    {
                      "term": "A String", # The tag, e.g. album.
                      "schema": "A String", # Domain of schema, e.g. http://google.com.
                      "label": "A String", # The category label, suitable for display (e.g. "album cover").
                    },
                  ],
                  "objectType": "A String", # The type of media object. Possible values are:
                      # - "photo" - A photo.
                      # - "video" - A video.
                      # - "article" - An article, specified by a link.
                },
              ],
              "originalContent": "A String", # The content (text) as provided by the author, stored without any HTML formatting. When updating an activity's content, use the value of originalContent as the starting point from which to make edits.
              "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 (for example, 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, suitable for display.
                "id": "A String", # ID of the original actor.
              },
              "content": "A String", # The HTML-formatted content, suitable for display. When creating or updating an activity, this value must be supplied as plain text in the request. If successful, the response will contain the HTML-formatted content. When updating an activity, use originalContent as the starting value, then assign the updated text to this property.
              "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 being reshared.
              "objectType": "A String", # The type of the object. Possible values are:
                  # - "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.
            },
            "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.
                      # - "public" - Access to anyone on the web.
                  "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, indicating what action was performed. Possible values are:
                # - "post" - Publish content to the stream.
                # - "checkin" - Check in to a location.
                # - "share" - Reshare an activity.
            "geocode": "A String", # Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
            "radius": "A String", # Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
            "address": "A String", # Street address where this activity occurred.
            "crosspostSource": "A String", # If this activity is a crosspost from another system, this property specifies the ID of the original activity.
            "placeholder": True or False, # True if this activity is a placeholder.
            "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.
        "id": "A String", # The ID of this collection of activities.
        "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.