| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: class Resource</title> |
| </head><body bgcolor="#f0f0f8"> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <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> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Creates a new scrap.<br> |
| <br> |
| Args:<br> |
| body: object, The request body. (required)<br> |
| The object takes the form of:<br> |
| <br> |
| {<br> |
| "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| "links": [ # Links to resources related to this activity.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "title": "A String", # Title of the activity.<br> |
| "object": { # The activity's object.<br> |
| "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> |
| "items": [ # The list of additional items.<br> |
| {<br> |
| "displayName": "A String", # The title of the object.<br> |
| "links": [ # Links to other resources related to this object.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "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> |
| "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| "name": { # An object that encapsulates the individual components of a person's name.<br> |
| "givenName": "A String", # The given name (first name) of this person.<br> |
| "familyName": "A String", # The family name (last name) of this person.<br> |
| },<br> |
| "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| "url": "A String", # The URL of the person's profile photo.<br> |
| },<br> |
| "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| "id": "A String", # The person's opensocial ID.<br> |
| },<br> |
| "id": "A String", # The ID for the object.<br> |
| "objectType": "A String", # The object type.<br> |
| },<br> |
| ],<br> |
| "replies": { # Comments in reply to this activity.<br> |
| "totalItems": "A String", # Total number of comments.<br> |
| "items": [ # The list of comments.<br> |
| {<br> |
| "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| "href": "A String", # Link to the post on activity stream being commented.<br> |
| "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| },<br> |
| "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| "links": [ # List of resources for the comment.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "actor": { # The person who posted the comment.<br> |
| "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| "image": { # Image data about the actor.<br> |
| "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| },<br> |
| "displayName": "A String", # The name of the author, suitable for display.<br> |
| "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| },<br> |
| "content": "A String", # The content of the comment in text/html<br> |
| "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> |
| "id": "A String", # The unique ID for the comment.<br> |
| },<br> |
| ],<br> |
| "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| },<br> |
| "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> |
| },<br> |
| "updated": "A String", # The time at which the activity was last updated.<br> |
| "actor": { # The person who performed the activity.<br> |
| "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| "image": { # Image data about the actor.<br> |
| "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| },<br> |
| "displayName": "A String", # The name of the author, suitable for display.<br> |
| "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| },<br> |
| "access": { # Identifies who has access to see this activity.<br> |
| "items": [ # The list of ACL entries.<br> |
| {<br> |
| "type": "A String", # The type of entity to whom access is granted.<br> |
| "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> |
| },<br> |
| ],<br> |
| "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| "description": "A String", # Human readable description of the access granted.<br> |
| "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| },<br> |
| "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| # - add - User added new content to profile or album, e.g. video, photo.<br> |
| # - post - User publish content to the stream, e.g. status, scrap.<br> |
| # - update - User commented on an activity.<br> |
| # - make-friend - User added a new friend.<br> |
| # - birthday - User has a birthday.<br> |
| "published": "A String", # The time at which the activity was initially published.<br> |
| "id": "A String", # The ID for the activity.<br> |
| }<br> |
| <br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| "links": [ # Links to resources related to this activity.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "title": "A String", # Title of the activity.<br> |
| "object": { # The activity's object.<br> |
| "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> |
| "items": [ # The list of additional items.<br> |
| {<br> |
| "displayName": "A String", # The title of the object.<br> |
| "links": [ # Links to other resources related to this object.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "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> |
| "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| "name": { # An object that encapsulates the individual components of a person's name.<br> |
| "givenName": "A String", # The given name (first name) of this person.<br> |
| "familyName": "A String", # The family name (last name) of this person.<br> |
| },<br> |
| "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| "url": "A String", # The URL of the person's profile photo.<br> |
| },<br> |
| "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| "id": "A String", # The person's opensocial ID.<br> |
| },<br> |
| "id": "A String", # The ID for the object.<br> |
| "objectType": "A String", # The object type.<br> |
| },<br> |
| ],<br> |
| "replies": { # Comments in reply to this activity.<br> |
| "totalItems": "A String", # Total number of comments.<br> |
| "items": [ # The list of comments.<br> |
| {<br> |
| "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| "href": "A String", # Link to the post on activity stream being commented.<br> |
| "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| },<br> |
| "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| "links": [ # List of resources for the comment.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "actor": { # The person who posted the comment.<br> |
| "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| "image": { # Image data about the actor.<br> |
| "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| },<br> |
| "displayName": "A String", # The name of the author, suitable for display.<br> |
| "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| },<br> |
| "content": "A String", # The content of the comment in text/html<br> |
| "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> |
| "id": "A String", # The unique ID for the comment.<br> |
| },<br> |
| ],<br> |
| "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| },<br> |
| "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> |
| },<br> |
| "updated": "A String", # The time at which the activity was last updated.<br> |
| "actor": { # The person who performed the activity.<br> |
| "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| "image": { # Image data about the actor.<br> |
| "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| },<br> |
| "displayName": "A String", # The name of the author, suitable for display.<br> |
| "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| },<br> |
| "access": { # Identifies who has access to see this activity.<br> |
| "items": [ # The list of ACL entries.<br> |
| {<br> |
| "type": "A String", # The type of entity to whom access is granted.<br> |
| "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> |
| },<br> |
| ],<br> |
| "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| "description": "A String", # Human readable description of the access granted.<br> |
| "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| },<br> |
| "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| # - add - User added new content to profile or album, e.g. video, photo.<br> |
| # - post - User publish content to the stream, e.g. status, scrap.<br> |
| # - update - User commented on an activity.<br> |
| # - make-friend - User added a new friend.<br> |
| # - birthday - User has a birthday.<br> |
| "published": "A String", # The time at which the activity was initially published.<br> |
| "id": "A String", # The ID for the activity.<br> |
| }</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table> |
| </body></html> |