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> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 65 | "community": { # The community which is related with this activity, e.g. a joined community.<br> |
| 66 | "category": "A String", # The category of the community.<br> |
| 67 | "kind": "orkut#community", # Identifies this resource as a community. Value: "orkut#community"<br> |
| 68 | "member_count": 42, # The count of members on the community.<br> |
| 69 | "description": "A String", # The description of the community.<br> |
| 70 | "language": "A String", # The official language of the community.<br> |
| 71 | "links": [ # List of resources for the community.<br> |
| 72 | { # Links to resources related to the parent object.<br> |
| 73 | "href": "A String", # URL of the link.<br> |
| 74 | "type": "A String", # Media type of the link.<br> |
| 75 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 76 | "title": "A String", # Title of the link.<br> |
| 77 | },<br> |
| 78 | ],<br> |
| 79 | "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> |
| 80 | "owner": { # The person who owns the community.<br> |
| 81 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 82 | "image": { # Image data about the actor.<br> |
| 83 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 84 | },<br> |
| 85 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 86 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 87 | },<br> |
| 88 | "moderators": [ # The moderator of the community.<br> |
| 89 | {<br> |
| 90 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 91 | "image": { # Image data about the actor.<br> |
| 92 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 93 | },<br> |
| 94 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 95 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 96 | },<br> |
| 97 | ],<br> |
| 98 | "location": "A String", # The location of the community.<br> |
| 99 | "co_owners": [ # The co-owners of the community.<br> |
| 100 | {<br> |
| 101 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 102 | "image": { # Image data about the actor.<br> |
| 103 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 104 | },<br> |
| 105 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 106 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 107 | },<br> |
| 108 | ],<br> |
| 109 | "photo_url": "A String", # The photo of the community.<br> |
| 110 | "id": 42, # The id of the community.<br> |
| 111 | "name": "A String", # The name of the community.<br> |
| 112 | },<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 113 | "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> |
| 114 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 115 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 116 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 117 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 118 | },<br> |
| 119 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 120 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 121 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 122 | "url": "A String", # The URL of the person's profile photo.<br> |
| 123 | },<br> |
| 124 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 125 | "id": "A String", # The person's opensocial ID.<br> |
| 126 | },<br> |
| 127 | "id": "A String", # The ID for the object.<br> |
| 128 | "objectType": "A String", # The object type.<br> |
| 129 | },<br> |
| 130 | ],<br> |
| 131 | "replies": { # Comments in reply to this activity.<br> |
| 132 | "totalItems": "A String", # Total number of comments.<br> |
| 133 | "items": [ # The list of comments.<br> |
| 134 | {<br> |
| 135 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 136 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 137 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 138 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 139 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 140 | },<br> |
| 141 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 142 | "links": [ # List of resources for the comment.<br> |
| 143 | { # Links to resources related to the parent object.<br> |
| 144 | "href": "A String", # URL of the link.<br> |
| 145 | "type": "A String", # Media type of the link.<br> |
| 146 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 147 | "title": "A String", # Title of the link.<br> |
| 148 | },<br> |
| 149 | ],<br> |
| 150 | "actor": { # The person who posted the comment.<br> |
| 151 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 152 | "image": { # Image data about the actor.<br> |
| 153 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 154 | },<br> |
| 155 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 156 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 157 | },<br> |
| 158 | "content": "A String", # The content of the comment in text/html<br> |
| 159 | "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> |
| 160 | "id": "A String", # The unique ID for the comment.<br> |
| 161 | },<br> |
| 162 | ],<br> |
| 163 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 164 | },<br> |
| 165 | "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> |
| 166 | },<br> |
| 167 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 168 | "actor": { # The person who performed the activity.<br> |
| 169 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 170 | "image": { # Image data about the actor.<br> |
| 171 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 172 | },<br> |
| 173 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 174 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 175 | },<br> |
| 176 | "access": { # Identifies who has access to see this activity.<br> |
| 177 | "items": [ # The list of ACL entries.<br> |
| 178 | {<br> |
| 179 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 180 | "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> |
| 181 | },<br> |
| 182 | ],<br> |
| 183 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 184 | "description": "A String", # Human readable description of the access granted.<br> |
| 185 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 186 | },<br> |
| 187 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 188 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 189 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 190 | # - update - User commented on an activity.<br> |
| 191 | # - make-friend - User added a new friend.<br> |
| 192 | # - birthday - User has a birthday.<br> |
| 193 | "published": "A String", # The time at which the activity was initially published.<br> |
| 194 | "id": "A String", # The ID for the activity.<br> |
| 195 | },<br> |
| 196 | ],<br> |
| 197 | "kind": "orkut#activityList", # Identifies this resource as a collection of activities. Value: "orkut#activityList"<br> |
| 198 | }</tt></dd></dl> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 199 | |
| 200 | <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> |
| 201 | <br> |
| 202 | Args:<br> |
| 203 | previous_request: The request for the previous page.<br> |
| 204 | previous_response: The response from the request for the previous page.<br> |
| 205 | <br> |
| 206 | Returns:<br> |
| 207 | A request object that you can call 'execute()' on to request the next<br> |
| 208 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 209 | |
| 210 | <hr> |
| 211 | Data descriptors defined here:<br> |
| 212 | <dl><dt><strong>__dict__</strong></dt> |
| 213 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 214 | </dl> |
| 215 | <dl><dt><strong>__weakref__</strong></dt> |
| 216 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 217 | </dl> |
| 218 | </td></tr></table> |
| 219 | </body></html> |