Joe Gregorio | 945cca1 | 2012-02-21 11:59:48 -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-delete"><strong>delete</strong></a> = method(self, **kwargs)</dt><dd><tt>Moves a message of the community to the trash folder.<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | topicId: string, The ID of the topic whose message will be moved to the trash folder. (required)<br> |
| 21 | messageId: string, The ID of the message to be moved to the trash folder. (required)<br> |
| 22 | communityId: integer, The ID of the community whose message will be moved to the trash folder. (required)</tt></dd></dl> |
| 23 | |
| 24 | <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Adds a message to a given community topic.<br> |
| 25 | <br> |
| 26 | Args:<br> |
| 27 | body: object, The request body. (required)<br> |
| 28 | The object takes the form of:<br> |
| 29 | <br> |
| 30 | {<br> |
| 31 | "body": "A String", # The body of the message.<br> |
| 32 | "kind": "orkut#communityMessage", # Identifies this resource as a community message. Value: "orkut#communityMessage"<br> |
| 33 | "links": [ # List of resources for the community message.<br> |
| 34 | { # Links to resources related to the parent object.<br> |
| 35 | "href": "A String", # URL of the link.<br> |
| 36 | "type": "A String", # Media type of the link.<br> |
| 37 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 38 | "title": "A String", # Title of the link.<br> |
| 39 | },<br> |
| 40 | ],<br> |
| 41 | "author": { # The creator of the message. If ommited, the message is annonimous.<br> |
| 42 | "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] | 43 | "image": { # Image data about the author.<br> |
Joe Gregorio | 945cca1 | 2012-02-21 11:59:48 -0500 | [diff] [blame] | 44 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 45 | },<br> |
| 46 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 47 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 48 | },<br> |
| 49 | "id": "A String", # The ID of the message.<br> |
| 50 | "addedDate": "A String", # The timestamp of the date when the message was added, in <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> format.<br> |
| 51 | "isSpam": True or False, # Whether this post was marked as spam by the viewer, when he/she is not the community owner or one of its moderators.<br> |
| 52 | "subject": "A String", # The subject of the message.<br> |
| 53 | }<br> |
| 54 | <br> |
| 55 | topicId: string, The ID of the topic the message should be added to. (required)<br> |
| 56 | communityId: integer, The ID of the community the message should be added to. (required)<br> |
| 57 | <br> |
| 58 | Returns:<br> |
| 59 | An object of the form<br> |
| 60 | <br> |
| 61 | {<br> |
| 62 | "body": "A String", # The body of the message.<br> |
| 63 | "kind": "orkut#communityMessage", # Identifies this resource as a community message. Value: "orkut#communityMessage"<br> |
| 64 | "links": [ # List of resources for the community message.<br> |
| 65 | { # Links to resources related to the parent object.<br> |
| 66 | "href": "A String", # URL of the link.<br> |
| 67 | "type": "A String", # Media type of the link.<br> |
| 68 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 69 | "title": "A String", # Title of the link.<br> |
| 70 | },<br> |
| 71 | ],<br> |
| 72 | "author": { # The creator of the message. If ommited, the message is annonimous.<br> |
| 73 | "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] | 74 | "image": { # Image data about the author.<br> |
Joe Gregorio | 945cca1 | 2012-02-21 11:59:48 -0500 | [diff] [blame] | 75 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 76 | },<br> |
| 77 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 78 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 79 | },<br> |
| 80 | "id": "A String", # The ID of the message.<br> |
| 81 | "addedDate": "A String", # The timestamp of the date when the message was added, in <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> format.<br> |
| 82 | "isSpam": True or False, # Whether this post was marked as spam by the viewer, when he/she is not the community owner or one of its moderators.<br> |
| 83 | "subject": "A String", # The subject of the message.<br> |
| 84 | }</tt></dd></dl> |
| 85 | |
| 86 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves the messages of a topic of a community.<br> |
| 87 | <br> |
| 88 | Args:<br> |
| 89 | topicId: string, The ID of the topic which messages will be listed. (required)<br> |
| 90 | pageToken: string, A continuation token that allows pagination.<br> |
| 91 | maxResults: integer, The maximum number of messages to include in the response.<br> |
| 92 | hl: string, Specifies the interface language (host language) of your user interface.<br> |
| 93 | communityId: integer, The ID of the community which messages will be listed. (required)<br> |
| 94 | <br> |
| 95 | Returns:<br> |
| 96 | An object of the form<br> |
| 97 | <br> |
| 98 | {<br> |
| 99 | "nextPageToken": "A String", # The value of pageToken query parameter in community_messages.list request to get the next page, if there are more to retrieve.<br> |
| 100 | "kind": "orkut#communityMessageList", # Identifies this resource as a collection of community messages. Value: "orkut#communityMessageList"<br> |
| 101 | "items": [ # List of messages retrieved.<br> |
| 102 | {<br> |
| 103 | "body": "A String", # The body of the message.<br> |
| 104 | "kind": "orkut#communityMessage", # Identifies this resource as a community message. Value: "orkut#communityMessage"<br> |
| 105 | "links": [ # List of resources for the community message.<br> |
| 106 | { # Links to resources related to the parent object.<br> |
| 107 | "href": "A String", # URL of the link.<br> |
| 108 | "type": "A String", # Media type of the link.<br> |
| 109 | "rel": "A String", # Relation between the resource and the parent object.<br> |
| 110 | "title": "A String", # Title of the link.<br> |
| 111 | },<br> |
| 112 | ],<br> |
| 113 | "author": { # The creator of the message. If ommited, the message is annonimous.<br> |
| 114 | "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] | 115 | "image": { # Image data about the author.<br> |
Joe Gregorio | 945cca1 | 2012-02-21 11:59:48 -0500 | [diff] [blame] | 116 | "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| 117 | },<br> |
| 118 | "displayName": "A String", # The name of the author, suitable for display.<br> |
| 119 | "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| 120 | },<br> |
| 121 | "id": "A String", # The ID of the message.<br> |
| 122 | "addedDate": "A String", # The timestamp of the date when the message was added, in <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> format.<br> |
| 123 | "isSpam": True or False, # Whether this post was marked as spam by the viewer, when he/she is not the community owner or one of its moderators.<br> |
| 124 | "subject": "A String", # The subject of the message.<br> |
| 125 | },<br> |
| 126 | ],<br> |
| 127 | "prevPageToken": "A String", # The value of pageToken query parameter in community_messages.list request to get the previous page, if there are more to retrieve.<br> |
| 128 | "lastPageToken": "A String", # The value of pageToken query parameter in community_messages.list request to get the last page.<br> |
| 129 | "firstPageToken": "A String", # The value of pageToken query parameter in community_messages.list request to get the first page.<br> |
| 130 | }</tt></dd></dl> |
| 131 | |
| 132 | <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> |
| 133 | <br> |
| 134 | Args:<br> |
| 135 | previous_request: The request for the previous page.<br> |
| 136 | previous_response: The response from the request for the previous page.<br> |
| 137 | <br> |
| 138 | Returns:<br> |
| 139 | A request object that you can call 'execute()' on to request the next<br> |
| 140 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 141 | |
| 142 | <hr> |
| 143 | Data descriptors defined here:<br> |
| 144 | <dl><dt><strong>__dict__</strong></dt> |
| 145 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 146 | </dl> |
| 147 | <dl><dt><strong>__weakref__</strong></dt> |
| 148 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 149 | </dl> |
| 150 | </td></tr></table> |
| 151 | </body></html> |