Joe Gregorio | c4fc095 | 2011-11-09 12:21:11 -0500 | [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-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Creates a new scrap.<br> |
| 18 | <br> |
| 19 | Args:<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 20 | body: object, The request body. (required)<br> |
| 21 | The object takes the form of:<br> |
| 22 | <br> |
| 23 | {<br> |
| 24 | "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| 25 | "links": [ # Links to resources related to this activity.<br> |
| 26 | { # Links to resources related to the parent object.<br> |
| 27 | "href": "A String", # URL of the link.<br> |
| 28 | "type": "A String", # Media type of the link.<br> |
| 29 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 30 | "title": "A String", # Title of the link.<br> |
| 31 | },<br> |
| 32 | ],<br> |
| 33 | "title": "A String", # Title of the activity.<br> |
| 34 | "object": { # The activity's object.<br> |
| 35 | "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> |
| 36 | "items": [ # The list of additional items.<br> |
| 37 | {<br> |
| 38 | "displayName": "A String", # The title of the object.<br> |
| 39 | "links": [ # Links to other resources related to this object.<br> |
| 40 | { # Links to resources related to the parent object.<br> |
| 41 | "href": "A String", # URL of the link.<br> |
| 42 | "type": "A String", # Media type of the link.<br> |
| 43 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 44 | "title": "A String", # Title of the link.<br> |
| 45 | },<br> |
| 46 | ],<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 47 | "community": { # The community which is related with this activity, e.g. a joined community.<br> |
| 48 | "category": "A String", # The category of the community.<br> |
| 49 | "kind": "orkut#community", # Identifies this resource as a community. Value: "orkut#community"<br> |
| 50 | "member_count": 42, # The count of members on the community.<br> |
| 51 | "description": "A String", # The description of the community.<br> |
| 52 | "language": "A String", # The official language of the community.<br> |
| 53 | "links": [ # List of resources for the community.<br> |
| 54 | { # Links to resources related to the parent object.<br> |
| 55 | "href": "A String", # URL of the link.<br> |
| 56 | "type": "A String", # Media type of the link.<br> |
| 57 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 58 | "title": "A String", # Title of the link.<br> |
| 59 | },<br> |
| 60 | ],<br> |
| 61 | "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> |
| 62 | "owner": { # The person who owns the community.<br> |
| 63 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 64 | "image": { # Image data about the actor.<br> |
| 65 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 66 | },<br> |
| 67 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 68 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 69 | },<br> |
| 70 | "moderators": [ # The moderator of the community.<br> |
| 71 | {<br> |
| 72 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 73 | "image": { # Image data about the actor.<br> |
| 74 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 75 | },<br> |
| 76 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 77 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 78 | },<br> |
| 79 | ],<br> |
| 80 | "location": "A String", # The location of the community.<br> |
| 81 | "co_owners": [ # The co-owners of the community.<br> |
| 82 | {<br> |
| 83 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 84 | "image": { # Image data about the actor.<br> |
| 85 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 86 | },<br> |
| 87 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 88 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 89 | },<br> |
| 90 | ],<br> |
| 91 | "photo_url": "A String", # The photo of the community.<br> |
| 92 | "id": 42, # The id of the community.<br> |
| 93 | "name": "A String", # The name of the community.<br> |
| 94 | },<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 95 | "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> |
| 96 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 97 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 98 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 99 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 100 | },<br> |
| 101 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 102 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 103 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 104 | "url": "A String", # The URL of the person's profile photo.<br> |
| 105 | },<br> |
| 106 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 107 | "id": "A String", # The person's opensocial ID.<br> |
| 108 | },<br> |
| 109 | "id": "A String", # The ID for the object.<br> |
| 110 | "objectType": "A String", # The object type.<br> |
| 111 | },<br> |
| 112 | ],<br> |
| 113 | "replies": { # Comments in reply to this activity.<br> |
| 114 | "totalItems": "A String", # Total number of comments.<br> |
| 115 | "items": [ # The list of comments.<br> |
| 116 | {<br> |
| 117 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 118 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 119 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 120 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 121 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 122 | },<br> |
| 123 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 124 | "links": [ # List of resources for the comment.<br> |
| 125 | { # Links to resources related to the parent object.<br> |
| 126 | "href": "A String", # URL of the link.<br> |
| 127 | "type": "A String", # Media type of the link.<br> |
| 128 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 129 | "title": "A String", # Title of the link.<br> |
| 130 | },<br> |
| 131 | ],<br> |
| 132 | "actor": { # The person who posted the comment.<br> |
| 133 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 134 | "image": { # Image data about the actor.<br> |
| 135 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 136 | },<br> |
| 137 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 138 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 139 | },<br> |
| 140 | "content": "A String", # The content of the comment in text/html<br> |
| 141 | "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> |
| 142 | "id": "A String", # The unique ID for the comment.<br> |
| 143 | },<br> |
| 144 | ],<br> |
| 145 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 146 | },<br> |
| 147 | "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> |
| 148 | },<br> |
| 149 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 150 | "actor": { # The person who performed the activity.<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 | "access": { # Identifies who has access to see this activity.<br> |
| 159 | "items": [ # The list of ACL entries.<br> |
| 160 | {<br> |
| 161 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 162 | "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> |
| 163 | },<br> |
| 164 | ],<br> |
| 165 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 166 | "description": "A String", # Human readable description of the access granted.<br> |
| 167 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 168 | },<br> |
| 169 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 170 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 171 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 172 | # - update - User commented on an activity.<br> |
| 173 | # - make-friend - User added a new friend.<br> |
| 174 | # - birthday - User has a birthday.<br> |
| 175 | "published": "A String", # The time at which the activity was initially published.<br> |
| 176 | "id": "A String", # The ID for the activity.<br> |
| 177 | }<br> |
| 178 | <br> |
| 179 | <br> |
| 180 | Returns:<br> |
| 181 | An object of the form<br> |
| 182 | <br> |
| 183 | {<br> |
| 184 | "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| 185 | "links": [ # Links to resources related to this activity.<br> |
| 186 | { # Links to resources related to the parent object.<br> |
| 187 | "href": "A String", # URL of the link.<br> |
| 188 | "type": "A String", # Media type of the link.<br> |
| 189 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 190 | "title": "A String", # Title of the link.<br> |
| 191 | },<br> |
| 192 | ],<br> |
| 193 | "title": "A String", # Title of the activity.<br> |
| 194 | "object": { # The activity's object.<br> |
| 195 | "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> |
| 196 | "items": [ # The list of additional items.<br> |
| 197 | {<br> |
| 198 | "displayName": "A String", # The title of the object.<br> |
| 199 | "links": [ # Links to other resources related to this object.<br> |
| 200 | { # Links to resources related to the parent object.<br> |
| 201 | "href": "A String", # URL of the link.<br> |
| 202 | "type": "A String", # Media type of the link.<br> |
| 203 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 204 | "title": "A String", # Title of the link.<br> |
| 205 | },<br> |
| 206 | ],<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame] | 207 | "community": { # The community which is related with this activity, e.g. a joined community.<br> |
| 208 | "category": "A String", # The category of the community.<br> |
| 209 | "kind": "orkut#community", # Identifies this resource as a community. Value: "orkut#community"<br> |
| 210 | "member_count": 42, # The count of members on the community.<br> |
| 211 | "description": "A String", # The description of the community.<br> |
| 212 | "language": "A String", # The official language of the community.<br> |
| 213 | "links": [ # List of resources for the community.<br> |
| 214 | { # Links to resources related to the parent object.<br> |
| 215 | "href": "A String", # URL of the link.<br> |
| 216 | "type": "A String", # Media type of the link.<br> |
| 217 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 218 | "title": "A String", # Title of the link.<br> |
| 219 | },<br> |
| 220 | ],<br> |
| 221 | "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> |
| 222 | "owner": { # The person who owns the community.<br> |
| 223 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 224 | "image": { # Image data about the actor.<br> |
| 225 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 226 | },<br> |
| 227 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 228 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 229 | },<br> |
| 230 | "moderators": [ # The moderator of the community.<br> |
| 231 | {<br> |
| 232 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 233 | "image": { # Image data about the actor.<br> |
| 234 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 235 | },<br> |
| 236 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 237 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 238 | },<br> |
| 239 | ],<br> |
| 240 | "location": "A String", # The location of the community.<br> |
| 241 | "co_owners": [ # The co-owners of the community.<br> |
| 242 | {<br> |
| 243 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 244 | "image": { # Image data about the actor.<br> |
| 245 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 246 | },<br> |
| 247 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 248 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 249 | },<br> |
| 250 | ],<br> |
| 251 | "photo_url": "A String", # The photo of the community.<br> |
| 252 | "id": 42, # The id of the community.<br> |
| 253 | "name": "A String", # The name of the community.<br> |
| 254 | },<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 255 | "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> |
| 256 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 257 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 258 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 259 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 260 | },<br> |
| 261 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 262 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 263 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 264 | "url": "A String", # The URL of the person's profile photo.<br> |
| 265 | },<br> |
| 266 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 267 | "id": "A String", # The person's opensocial ID.<br> |
| 268 | },<br> |
| 269 | "id": "A String", # The ID for the object.<br> |
| 270 | "objectType": "A String", # The object type.<br> |
| 271 | },<br> |
| 272 | ],<br> |
| 273 | "replies": { # Comments in reply to this activity.<br> |
| 274 | "totalItems": "A String", # Total number of comments.<br> |
| 275 | "items": [ # The list of comments.<br> |
| 276 | {<br> |
| 277 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 278 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 279 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 280 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 281 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 282 | },<br> |
| 283 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 284 | "links": [ # List of resources for the comment.<br> |
| 285 | { # Links to resources related to the parent object.<br> |
| 286 | "href": "A String", # URL of the link.<br> |
| 287 | "type": "A String", # Media type of the link.<br> |
| 288 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 289 | "title": "A String", # Title of the link.<br> |
| 290 | },<br> |
| 291 | ],<br> |
| 292 | "actor": { # The person who posted the comment.<br> |
| 293 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 294 | "image": { # Image data about the actor.<br> |
| 295 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 296 | },<br> |
| 297 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 298 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 299 | },<br> |
| 300 | "content": "A String", # The content of the comment in text/html<br> |
| 301 | "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> |
| 302 | "id": "A String", # The unique ID for the comment.<br> |
| 303 | },<br> |
| 304 | ],<br> |
| 305 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 306 | },<br> |
| 307 | "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> |
| 308 | },<br> |
| 309 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 310 | "actor": { # The person who performed the activity.<br> |
| 311 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 312 | "image": { # Image data about the actor.<br> |
| 313 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 314 | },<br> |
| 315 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 316 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 317 | },<br> |
| 318 | "access": { # Identifies who has access to see this activity.<br> |
| 319 | "items": [ # The list of ACL entries.<br> |
| 320 | {<br> |
| 321 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 322 | "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> |
| 323 | },<br> |
| 324 | ],<br> |
| 325 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 326 | "description": "A String", # Human readable description of the access granted.<br> |
| 327 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 328 | },<br> |
| 329 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 330 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 331 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 332 | # - update - User commented on an activity.<br> |
| 333 | # - make-friend - User added a new friend.<br> |
| 334 | # - birthday - User has a birthday.<br> |
| 335 | "published": "A String", # The time at which the activity was initially published.<br> |
| 336 | "id": "A String", # The ID for the activity.<br> |
| 337 | }</tt></dd></dl> |
Joe Gregorio | c4fc095 | 2011-11-09 12:21:11 -0500 | [diff] [blame] | 338 | |
| 339 | <hr> |
| 340 | Data descriptors defined here:<br> |
| 341 | <dl><dt><strong>__dict__</strong></dt> |
| 342 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 343 | </dl> |
| 344 | <dl><dt><strong>__weakref__</strong></dt> |
| 345 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 346 | </dl> |
| 347 | </td></tr></table> |
| 348 | </body></html> |