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> |
| 47 | "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> |
| 48 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 49 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 50 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 51 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 52 | },<br> |
| 53 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 54 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 55 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 56 | "url": "A String", # The URL of the person's profile photo.<br> |
| 57 | },<br> |
| 58 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 59 | "id": "A String", # The person's opensocial ID.<br> |
| 60 | },<br> |
| 61 | "id": "A String", # The ID for the object.<br> |
| 62 | "objectType": "A String", # The object type.<br> |
| 63 | },<br> |
| 64 | ],<br> |
| 65 | "replies": { # Comments in reply to this activity.<br> |
| 66 | "totalItems": "A String", # Total number of comments.<br> |
| 67 | "items": [ # The list of comments.<br> |
| 68 | {<br> |
| 69 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 70 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 71 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 72 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 73 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 74 | },<br> |
| 75 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 76 | "links": [ # List of resources for the comment.<br> |
| 77 | { # Links to resources related to the parent object.<br> |
| 78 | "href": "A String", # URL of the link.<br> |
| 79 | "type": "A String", # Media type of the link.<br> |
| 80 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 81 | "title": "A String", # Title of the link.<br> |
| 82 | },<br> |
| 83 | ],<br> |
| 84 | "actor": { # The person who posted the comment.<br> |
| 85 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 86 | "image": { # Image data about the actor.<br> |
| 87 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 88 | },<br> |
| 89 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 90 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 91 | },<br> |
| 92 | "content": "A String", # The content of the comment in text/html<br> |
| 93 | "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> |
| 94 | "id": "A String", # The unique ID for the comment.<br> |
| 95 | },<br> |
| 96 | ],<br> |
| 97 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 98 | },<br> |
| 99 | "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> |
| 100 | },<br> |
| 101 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 102 | "actor": { # The person who performed the activity.<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 | "access": { # Identifies who has access to see this activity.<br> |
| 111 | "items": [ # The list of ACL entries.<br> |
| 112 | {<br> |
| 113 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 114 | "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> |
| 115 | },<br> |
| 116 | ],<br> |
| 117 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 118 | "description": "A String", # Human readable description of the access granted.<br> |
| 119 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 120 | },<br> |
| 121 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 122 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 123 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 124 | # - update - User commented on an activity.<br> |
| 125 | # - make-friend - User added a new friend.<br> |
| 126 | # - birthday - User has a birthday.<br> |
| 127 | "published": "A String", # The time at which the activity was initially published.<br> |
| 128 | "id": "A String", # The ID for the activity.<br> |
| 129 | }<br> |
| 130 | <br> |
| 131 | <br> |
| 132 | Returns:<br> |
| 133 | An object of the form<br> |
| 134 | <br> |
| 135 | {<br> |
| 136 | "kind": "orkut#activity", # The kind of activity. Always orkut#activity.<br> |
| 137 | "links": [ # Links to resources related to this activity.<br> |
| 138 | { # Links to resources related to the parent object.<br> |
| 139 | "href": "A String", # URL of the link.<br> |
| 140 | "type": "A String", # Media type of the link.<br> |
| 141 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 142 | "title": "A String", # Title of the link.<br> |
| 143 | },<br> |
| 144 | ],<br> |
| 145 | "title": "A String", # Title of the activity.<br> |
| 146 | "object": { # The activity's object.<br> |
| 147 | "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> |
| 148 | "items": [ # The list of additional items.<br> |
| 149 | {<br> |
| 150 | "displayName": "A String", # The title of the object.<br> |
| 151 | "links": [ # Links to other resources related to this object.<br> |
| 152 | { # Links to resources related to the parent object.<br> |
| 153 | "href": "A String", # URL of the link.<br> |
| 154 | "type": "A String", # Media type of the link.<br> |
| 155 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 156 | "title": "A String", # Title of the link.<br> |
| 157 | },<br> |
| 158 | ],<br> |
| 159 | "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> |
| 160 | "person": { # The person who is related with this activity, e.g. an Added User.<br> |
| 161 | "name": { # An object that encapsulates the individual components of a person's name.<br> |
| 162 | "givenName": "A String", # The given name (first name) of this person.<br> |
| 163 | "familyName": "A String", # The family name (last name) of this person.<br> |
| 164 | },<br> |
| 165 | "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 166 | "gender": "A String", # The person's gender. Values include "male", "female", and "other".<br> |
| 167 | "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields.<br> |
| 168 | "url": "A String", # The URL of the person's profile photo.<br> |
| 169 | },<br> |
| 170 | "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD.<br> |
| 171 | "id": "A String", # The person's opensocial ID.<br> |
| 172 | },<br> |
| 173 | "id": "A String", # The ID for the object.<br> |
| 174 | "objectType": "A String", # The object type.<br> |
| 175 | },<br> |
| 176 | ],<br> |
| 177 | "replies": { # Comments in reply to this activity.<br> |
| 178 | "totalItems": "A String", # Total number of comments.<br> |
| 179 | "items": [ # The list of comments.<br> |
| 180 | {<br> |
| 181 | "inReplyTo": { # Link to the original activity where this comment was posted.<br> |
| 182 | "type": "A String", # Type of the post on activity stream being commented. Always text/html.<br> |
| 183 | "href": "A String", # Link to the post on activity stream being commented.<br> |
| 184 | "ref": "A String", # Unique identifier of the post on activity stream being commented.<br> |
| 185 | "rel": "inReplyTo", # Relationship between the comment and the post on activity stream being commented. Always inReplyTo.<br> |
| 186 | },<br> |
| 187 | "kind": "orkut#comment", # Identifies this resource as a comment. Value: "orkut#comment"<br> |
| 188 | "links": [ # List of resources for the comment.<br> |
| 189 | { # Links to resources related to the parent object.<br> |
| 190 | "href": "A String", # URL of the link.<br> |
| 191 | "type": "A String", # Media type of the link.<br> |
| 192 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 193 | "title": "A String", # Title of the link.<br> |
| 194 | },<br> |
| 195 | ],<br> |
| 196 | "actor": { # The person who posted the comment.<br> |
| 197 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 198 | "image": { # Image data about the actor.<br> |
| 199 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 200 | },<br> |
| 201 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 202 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 203 | },<br> |
| 204 | "content": "A String", # The content of the comment in text/html<br> |
| 205 | "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> |
| 206 | "id": "A String", # The unique ID for the comment.<br> |
| 207 | },<br> |
| 208 | ],<br> |
| 209 | "url": "A String", # URL for the collection of comments in reply to this activity.<br> |
| 210 | },<br> |
| 211 | "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> |
| 212 | },<br> |
| 213 | "updated": "A String", # The time at which the activity was last updated.<br> |
| 214 | "actor": { # The person who performed the activity.<br> |
| 215 | "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| 216 | "image": { # Image data about the actor.<br> |
| 217 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 218 | },<br> |
| 219 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 220 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 221 | },<br> |
| 222 | "access": { # Identifies who has access to see this activity.<br> |
| 223 | "items": [ # The list of ACL entries.<br> |
| 224 | {<br> |
| 225 | "type": "A String", # The type of entity to whom access is granted.<br> |
| 226 | "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> |
| 227 | },<br> |
| 228 | ],<br> |
| 229 | "kind": "orkut#acl", # Identifies this resource as an access control list. Value: "orkut#acl"<br> |
| 230 | "description": "A String", # Human readable description of the access granted.<br> |
| 231 | "totalParticipants": 42, # The total count of participants of the parent resource.<br> |
| 232 | },<br> |
| 233 | "verb": "A String", # This activity's verb, indicating what action was performed. Possible values are:<br> |
| 234 | # - add - User added new content to profile or album, e.g. video, photo.<br> |
| 235 | # - post - User publish content to the stream, e.g. status, scrap.<br> |
| 236 | # - update - User commented on an activity.<br> |
| 237 | # - make-friend - User added a new friend.<br> |
| 238 | # - birthday - User has a birthday.<br> |
| 239 | "published": "A String", # The time at which the activity was initially published.<br> |
| 240 | "id": "A String", # The ID for the activity.<br> |
| 241 | }</tt></dd></dl> |
Joe Gregorio | c4fc095 | 2011-11-09 12:21:11 -0500 | [diff] [blame] | 242 | |
| 243 | <hr> |
| 244 | Data descriptors defined here:<br> |
| 245 | <dl><dt><strong>__dict__</strong></dt> |
| 246 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 247 | </dl> |
| 248 | <dl><dt><strong>__weakref__</strong></dt> |
| 249 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 250 | </dl> |
| 251 | </td></tr></table> |
| 252 | </body></html> |