Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: class Resource</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | <p> |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 7 | <tr bgcolor="#ffc8d8"> |
| 8 | <td colspan=3 valign=bottom> <br> |
| 9 | <font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 10 | |
| 11 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 12 | <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| 13 | <tr><td> </td> |
| 14 | <td width="100%">Methods defined here:<br> |
| 15 | <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| 16 | |
| 17 | <dl><dt><a name="Resource-delete"><strong>delete</strong></a> = method(self, **kwargs)</dt><dd><tt>Deletes an existing activity, if the access controls allow it.<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | activityId: string, ID of the activity to remove. (required)</tt></dd></dl> |
| 21 | |
| 22 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves a list of activities.<br> |
| 23 | <br> |
| 24 | Args:<br> |
| 25 | pageToken: string, A continuation token that allows pagination.<br> |
| 26 | userId: string, The ID of the user whose activities will be listed. Can be me to refer to the viewer (i.e. the authenticated user). (required)<br> |
| 27 | maxResults: integer, The maximum number of activities to include in the response.<br> |
| 28 | collection: string, The collection of activities to list. (required)<br> |
| 29 | Allowed values<br> |
| 30 | all - All activities created by the specified user that the authenticated user is authorized to view.<br> |
| 31 | scraps - The specified user's scrapbook.<br> |
| 32 | stream - The specified user's stream feed, intended for consumption. This includes activities posted by people that the user is following, and activities in which the user has been mentioned.<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame^] | 33 | hl: string, Specifies the interface language (host language) of your user interface.<br> |
| 34 | <br> |
| 35 | Returns:<br> |
| 36 | An object of the form<br> |
| 37 | <br> |
| 38 | {<br> |
| 39 | "nextPageToken": "A String", # The value of pageToken query parameter in activities.list request to get the next page, if there are more to retrieve.<br> |
| 40 | "items": [ # List of activities retrieved.<br> |
| 41 | {<br> |
| 42 | "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| 43 | "links": [ # Links to resources related to this activity.<br> |
| 44 | { # Links to resources related to the parent object.<br> |
| 45 | "href": "A String", # URL of the link.<br> |
| 46 | "type": "A String", # Media type of the link.<br> |
| 47 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 48 | "title": "A String", # Title of the link.<br> |
| 49 | },<br> |
| 50 | ],<br> |
| 51 | "title": "A String", # Title of the activity.<br> |
| 52 | "object": { # The activity's object.<br> |
| 53 | "content": "A String", # The HTML-formatted content, suitable for display. When updating an activity's content, post the changes to this property, using the value of originalContent as a starting point. If the update is successful, the server adds HTML formatting and responds with this formatted content.<br> |
| 54 | "items": [ # The list of additional items.<br> |
| 55 | {<br> |
| 56 | "displayName": "A String", # The title of the object.<br> |
| 57 | "links": [ # Links to other resources related to this object.<br> |
| 58 | { # Links to resources related to the parent object.<br> |
| 59 | "href": "A String", # URL of the link.<br> |
| 60 | "type": "A String", # Media type of the link.<br> |
| 61 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 62 | "title": "A String", # Title of the link.<br> |
| 63 | },<br> |
| 64 | ],<br> |
| 65 | "content": "A String", # The HTML-formatted content, suitable for display. When updating an activity's content, post the changes to this property, using the value of originalContent as a starting point. If the update is successful, the server adds HTML formatting and responds with this formatted content.<br> |
| 66 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 67 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 68 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 69 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 70 | },<br> |
| 71 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 72 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 73 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 74 | "url": "A String", # The URL of the person's profile photo.<br> |
| 75 | },<br> |
| 76 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 77 | "id": "A String", # The person's opensocial ID.<br> |
| 78 | },<br> |
| 79 | "id": "A String", # The ID for the object.<br> |
| 80 | "objectType": "A String", # The object type.<br> |
| 81 | },<br> |
| 82 | ],<br> |
| 83 | "replies": { # Comments in reply to this activity.<br> |
| 84 | "totalItems": "A String", # Total number of comments.<br> |
| 85 | "items": [ # The list of comments.<br> |
| 86 | {<br> |
| 87 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 88 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 89 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 90 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 91 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 92 | },<br> |
| 93 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 94 | "links": [ # List of resources for the comment.<br> |
| 95 | { # Links to resources related to the parent object.<br> |
| 96 | "href": "A String", # URL of the link.<br> |
| 97 | "type": "A String", # Media type of the link.<br> |
| 98 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 99 | "title": "A String", # Title of the link.<br> |
| 100 | },<br> |
| 101 | ],<br> |
| 102 | "actor": { # The person who posted the comment.<br> |
| 103 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 104 | "image": { # Image data about the actor.<br> |
| 105 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 106 | },<br> |
| 107 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 108 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 109 | },<br> |
| 110 | "content": "A String", # The content of the comment in text/html<br> |
| 111 | "published": "A String", # The time the comment was initially published, in <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> format.<br> |
| 112 | "id": "A String", # The unique ID for the comment.<br> |
| 113 | },<br> |
| 114 | ],<br> |
| 115 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 116 | },<br> |
| 117 | "objectType": "A String", # The type of the object affected by the activity. Clients can use this information to style the rendered activity object differently depending on the content.<br> |
| 118 | },<br> |
| 119 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 120 | "actor": { # The person who performed the activity.<br> |
| 121 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 122 | "image": { # Image data about the actor.<br> |
| 123 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 124 | },<br> |
| 125 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 126 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 127 | },<br> |
| 128 | "access": { # Identifies who has access to see this activity.<br> |
| 129 | "items": [ # The list of ACL entries.<br> |
| 130 | {<br> |
| 131 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 132 | "id": "A String", # The ID of the entity. For entities of type "person" or "circle", this is the ID of the resource. For other types, this will be unset.<br> |
| 133 | },<br> |
| 134 | ],<br> |
| 135 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 136 | "description": "A String", # Human readable description of the access granted.<br> |
| 137 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 138 | },<br> |
| 139 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 140 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 141 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 142 | # - update - User commented on an activity.<br> |
| 143 | # - make-friend - User added a new friend.<br> |
| 144 | # - birthday - User has a birthday.<br> |
| 145 | "published": "A String", # The time at which the activity was initially published.<br> |
| 146 | "id": "A String", # The ID for the activity.<br> |
| 147 | },<br> |
| 148 | ],<br> |
| 149 | "kind": "orkut#activityList", # Identifies this resource as a collection of activities. Value: "orkut#activityList"<br> |
| 150 | }</tt></dd></dl> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 151 | |
| 152 | <dl><dt><a name="Resource-list_next"><strong>list_next</strong></a> = methodNext(self, previous_request, previous_response)</dt><dd><tt>Retrieves the next page of results.<br> |
| 153 | <br> |
| 154 | Args:<br> |
| 155 | previous_request: The request for the previous page.<br> |
| 156 | previous_response: The response from the request for the previous page.<br> |
| 157 | <br> |
| 158 | Returns:<br> |
| 159 | A request object that you can call 'execute()' on to request the next<br> |
| 160 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 161 | |
| 162 | <hr> |
| 163 | Data descriptors defined here:<br> |
| 164 | <dl><dt><strong>__dict__</strong></dt> |
| 165 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 166 | </dl> |
| 167 | <dl><dt><strong>__weakref__</strong></dt> |
| 168 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 169 | </dl> |
| 170 | </td></tr></table> |
| 171 | </body></html> |