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> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 20 | pp: string, A parameter<br> |
| 21 | trace: string, A parameter<br> |
| 22 | strict: string, A parameter<br> |
| 23 | activityId: string, ID of the activity to remove. (required)<br> |
| 24 | userip: string, A parameter</tt></dd></dl> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 25 | |
| 26 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves a list of activities.<br> |
| 27 | <br> |
| 28 | Args:<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 29 | pp: string, A parameter<br> |
| 30 | trace: string, A parameter<br> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 31 | pageToken: string, A continuation token that allows pagination.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 32 | hl: string, Specifies the interface language (host language) of your user interface.<br> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 33 | 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> |
| 34 | maxResults: integer, The maximum number of activities to include in the response.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 35 | strict: string, A parameter<br> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 36 | collection: string, The collection of activities to list. (required)<br> |
| 37 | Allowed values<br> |
| 38 | all - All activities created by the specified user that the authenticated user is authorized to view.<br> |
| 39 | scraps - The specified user's scrapbook.<br> |
| 40 | 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 | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 41 | userip: string, A parameter<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 42 | <br> |
| 43 | Returns:<br> |
| 44 | An object of the form<br> |
| 45 | <br> |
| 46 | {<br> |
| 47 | "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> |
| 48 | "items": [ # List of activities retrieved.<br> |
| 49 | {<br> |
| 50 | "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| 51 | "links": [ # Links to resources related to this activity.<br> |
| 52 | { # Links to resources related to the parent object.<br> |
| 53 | "href": "A String", # URL of the link.<br> |
| 54 | "type": "A String", # Media type of the link.<br> |
| 55 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 56 | "title": "A String", # Title of the link.<br> |
| 57 | },<br> |
| 58 | ],<br> |
| 59 | "title": "A String", # Title of the activity.<br> |
| 60 | "object": { # The activity's object.<br> |
| 61 | "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> |
| 62 | "items": [ # The list of additional items.<br> |
| 63 | {<br> |
| 64 | "displayName": "A String", # The title of the object.<br> |
| 65 | "links": [ # Links to other resources related to this object.<br> |
| 66 | { # Links to resources related to the parent object.<br> |
| 67 | "href": "A String", # URL of the link.<br> |
| 68 | "type": "A String", # Media type of the link.<br> |
| 69 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 70 | "title": "A String", # Title of the link.<br> |
| 71 | },<br> |
| 72 | ],<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 73 | "community": { # The community which is related with this activity, e.g. a joined community.<br> |
| 74 | "category": "A String", # The category of the community.<br> |
| 75 | "kind": "orkut#community", # Identifies this resource as a community. Value: "orkut#community"<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 76 | "member_count": 42, # The number of users who are part of the community. This number may be approximate, so do not rely on it for iteration.<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 77 | "description": "A String", # The description of the community.<br> |
| 78 | "language": "A String", # The official language of the community.<br> |
| 79 | "links": [ # List of resources for the community.<br> |
| 80 | { # Links to resources related to the parent object.<br> |
| 81 | "href": "A String", # URL of the link.<br> |
| 82 | "type": "A String", # Media type of the link.<br> |
| 83 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 84 | "title": "A String", # Title of the link.<br> |
| 85 | },<br> |
| 86 | ],<br> |
| 87 | "creation_date": "A String", # The time the community was created, in <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> format.<br> |
| 88 | "owner": { # The person who owns the community.<br> |
| 89 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 90 | "image": { # Image data about the author.<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 91 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 92 | },<br> |
| 93 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 94 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 95 | },<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 96 | "moderators": [ # The list of moderators of the community.<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 97 | {<br> |
| 98 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 99 | "image": { # Image data about the author.<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 100 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 101 | },<br> |
| 102 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 103 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 104 | },<br> |
| 105 | ],<br> |
| 106 | "location": "A String", # The location of the community.<br> |
| 107 | "co_owners": [ # The co-owners of the community.<br> |
| 108 | {<br> |
| 109 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 110 | "image": { # Image data about the author.<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 111 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 112 | },<br> |
| 113 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 114 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 115 | },<br> |
| 116 | ],<br> |
| 117 | "photo_url": "A String", # The photo of the community.<br> |
| 118 | "id": 42, # The id of the community.<br> |
| 119 | "name": "A String", # The name of the community.<br> |
| 120 | },<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 121 | "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> |
| 122 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 123 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 124 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 125 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 126 | },<br> |
| 127 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 128 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 129 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 130 | "url": "A String", # The URL of the person's profile photo.<br> |
| 131 | },<br> |
| 132 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 133 | "id": "A String", # The person's opensocial ID.<br> |
| 134 | },<br> |
| 135 | "id": "A String", # The ID for the object.<br> |
| 136 | "objectType": "A String", # The object type.<br> |
| 137 | },<br> |
| 138 | ],<br> |
| 139 | "replies": { # Comments in reply to this activity.<br> |
| 140 | "totalItems": "A String", # Total number of comments.<br> |
| 141 | "items": [ # The list of comments.<br> |
| 142 | {<br> |
| 143 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 144 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 145 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 146 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 147 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 148 | },<br> |
| 149 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 150 | "links": [ # List of resources for the comment.<br> |
| 151 | { # Links to resources related to the parent object.<br> |
| 152 | "href": "A String", # URL of the link.<br> |
| 153 | "type": "A String", # Media type of the link.<br> |
| 154 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 155 | "title": "A String", # Title of the link.<br> |
| 156 | },<br> |
| 157 | ],<br> |
| 158 | "actor": { # The person who posted the comment.<br> |
| 159 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 160 | "image": { # Image data about the author.<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 161 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 162 | },<br> |
| 163 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 164 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 165 | },<br> |
| 166 | "content": "A String", # The content of the comment in text/html<br> |
| 167 | "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> |
| 168 | "id": "A String", # The unique ID for the comment.<br> |
| 169 | },<br> |
| 170 | ],<br> |
| 171 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 172 | },<br> |
| 173 | "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> |
| 174 | },<br> |
| 175 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 176 | "actor": { # The person who performed the activity.<br> |
| 177 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 178 | "image": { # Image data about the author.<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 179 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 180 | },<br> |
| 181 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 182 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 183 | },<br> |
| 184 | "access": { # Identifies who has access to see this activity.<br> |
| 185 | "items": [ # The list of ACL entries.<br> |
| 186 | {<br> |
| 187 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 188 | "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> |
| 189 | },<br> |
| 190 | ],<br> |
| 191 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 192 | "description": "A String", # Human readable description of the access granted.<br> |
| 193 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 194 | },<br> |
| 195 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 196 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 197 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 198 | # - update - User commented on an activity.<br> |
| 199 | # - make-friend - User added a new friend.<br> |
| 200 | # - birthday - User has a birthday.<br> |
| 201 | "published": "A String", # The time at which the activity was initially published.<br> |
| 202 | "id": "A String", # The ID for the activity.<br> |
| 203 | },<br> |
| 204 | ],<br> |
| 205 | "kind": "orkut#activityList", # Identifies this resource as a collection of activities. Value: "orkut#activityList"<br> |
| 206 | }</tt></dd></dl> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 207 | |
| 208 | <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> |
| 209 | <br> |
| 210 | Args:<br> |
| 211 | previous_request: The request for the previous page.<br> |
| 212 | previous_response: The response from the request for the previous page.<br> |
| 213 | <br> |
| 214 | Returns:<br> |
| 215 | A request object that you can call 'execute()' on to request the next<br> |
| 216 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 217 | |
| 218 | <hr> |
| 219 | Data descriptors defined here:<br> |
| 220 | <dl><dt><strong>__dict__</strong></dt> |
| 221 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 222 | </dl> |
| 223 | <dl><dt><strong>__weakref__</strong></dt> |
| 224 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 225 | </dl> |
| 226 | </td></tr></table> |
| 227 | </body></html> |