Html程序  |  533行  |  30.2 KB

<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="plus_v1.html">Google+ API</a> . <a href="plus_v1.activities.html">activities</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#get">get(activityId)</a></code></p>
<p class="firstline">Get an activity.</p>
<p class="toc_element">
  <code><a href="#list">list(userId, collection, pageToken=None, maxResults=None)</a></code></p>
<p class="firstline">List all of the activities in the specified collection for a particular user.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#search">search(query, orderBy=None, language=None, pageToken=None, maxResults=None)</a></code></p>
<p class="firstline">Search public activities.</p>
<p class="toc_element">
  <code><a href="#search_next">search_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="get">get(activityId)</code>
  <pre>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.
  }</pre>
</div>

<div class="method">
    <code class="details" id="list">list(userId, collection, pageToken=None, maxResults=None)</code>
  <pre>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.
  }</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
  <pre>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.
    </pre>
</div>

<div class="method">
    <code class="details" id="search">search(query, orderBy=None, language=None, pageToken=None, maxResults=None)</code>
  <pre>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.
  }</pre>
</div>

<div class="method">
    <code class="details" id="search_next">search_next(previous_request, previous_response)</code>
  <pre>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.
    </pre>
</div>

</body></html>