| |
| <!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>Inserts a response for the specified submission in the specified topic within the specified series.<br> |
| <br> |
| Args:<br> |
| seriesId: integer, The decimal ID of the Series. (required)<br> |
| topicId: integer, The decimal ID of the Topic within the Series. (required)<br> |
| pp: string, A parameter<br> |
| unauthToken: string, User identifier for unauthenticated usage mode<br> |
| strict: string, A parameter<br> |
| body: object, The request body. (required)<br> |
| The object takes the form of:<br> |
| <br> |
| {<br> |
| "kind": "moderator#submission",<br> |
| "attribution": {<br> |
| "displayName": "A String",<br> |
| "location": "A String",<br> |
| "avatarUrl": "A String",<br> |
| },<br> |
| "created": "A String",<br> |
| "text": "A String",<br> |
| "topics": [<br> |
| {<br> |
| "id": {<br> |
| "seriesId": "A String",<br> |
| "topicId": "A String",<br> |
| },<br> |
| },<br> |
| ],<br> |
| "author": "A String",<br> |
| "translations": [<br> |
| {<br> |
| "lang": "A String",<br> |
| "text": "A String",<br> |
| },<br> |
| ],<br> |
| "parentSubmissionId": {<br> |
| "seriesId": "A String",<br> |
| "submissionId": "A String",<br> |
| },<br> |
| "vote": {<br> |
| "vote": "A String",<br> |
| "flag": "A String",<br> |
| },<br> |
| "attachmentUrl": "A String",<br> |
| "geo": {<br> |
| "latitude": 3.14,<br> |
| "location": "A String",<br> |
| "longitude": 3.14,<br> |
| },<br> |
| "id": {<br> |
| "seriesId": "A String",<br> |
| "submissionId": "A String",<br> |
| },<br> |
| "counters": {<br> |
| "noneVotes": 42,<br> |
| "minusVotes": 42,<br> |
| "plusVotes": 42,<br> |
| },<br> |
| }<br> |
| <br> |
| parentSubmissionId: integer, The decimal ID of the parent Submission within the Series. (required)<br> |
| userip: string, A parameter<br> |
| trace: string, A parameter<br> |
| anonymous: boolean, Set to true to mark the new submission as anonymous.<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "kind": "moderator#submission",<br> |
| "attribution": {<br> |
| "displayName": "A String",<br> |
| "location": "A String",<br> |
| "avatarUrl": "A String",<br> |
| },<br> |
| "created": "A String",<br> |
| "text": "A String",<br> |
| "topics": [<br> |
| {<br> |
| "id": {<br> |
| "seriesId": "A String",<br> |
| "topicId": "A String",<br> |
| },<br> |
| },<br> |
| ],<br> |
| "author": "A String",<br> |
| "translations": [<br> |
| {<br> |
| "lang": "A String",<br> |
| "text": "A String",<br> |
| },<br> |
| ],<br> |
| "parentSubmissionId": {<br> |
| "seriesId": "A String",<br> |
| "submissionId": "A String",<br> |
| },<br> |
| "vote": {<br> |
| "vote": "A String",<br> |
| "flag": "A String",<br> |
| },<br> |
| "attachmentUrl": "A String",<br> |
| "geo": {<br> |
| "latitude": 3.14,<br> |
| "location": "A String",<br> |
| "longitude": 3.14,<br> |
| },<br> |
| "id": {<br> |
| "seriesId": "A String",<br> |
| "submissionId": "A String",<br> |
| },<br> |
| "counters": {<br> |
| "noneVotes": 42,<br> |
| "minusVotes": 42,<br> |
| "plusVotes": 42,<br> |
| },<br> |
| }</tt></dd></dl> |
| |
| <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Lists or searches the responses for the specified submission within the specified series and returns the search results.<br> |
| <br> |
| Args:<br> |
| sort: string, Sort order.<br> |
| seriesId: integer, The decimal ID of the Series. (required)<br> |
| pp: string, A parameter<br> |
| trace: string, A parameter<br> |
| author: string, Restricts the results to submissions by a specific author.<br> |
| submissionId: integer, The decimal ID of the Submission within the Series. (required)<br> |
| q: string, Search query.<br> |
| strict: string, A parameter<br> |
| max_results: integer, Maximum number of results to return.<br> |
| hasAttachedVideo: boolean, Specifies whether to restrict to submissions that have videos attached.<br> |
| userip: string, A parameter<br> |
| start_index: integer, Index of the first result to be retrieved.<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "items": [<br> |
| {<br> |
| "kind": "moderator#submission",<br> |
| "attribution": {<br> |
| "displayName": "A String",<br> |
| "location": "A String",<br> |
| "avatarUrl": "A String",<br> |
| },<br> |
| "created": "A String",<br> |
| "text": "A String",<br> |
| "topics": [<br> |
| {<br> |
| "id": {<br> |
| "seriesId": "A String",<br> |
| "topicId": "A String",<br> |
| },<br> |
| },<br> |
| ],<br> |
| "author": "A String",<br> |
| "translations": [<br> |
| {<br> |
| "lang": "A String",<br> |
| "text": "A String",<br> |
| },<br> |
| ],<br> |
| "parentSubmissionId": {<br> |
| "seriesId": "A String",<br> |
| "submissionId": "A String",<br> |
| },<br> |
| "vote": {<br> |
| "vote": "A String",<br> |
| "flag": "A String",<br> |
| },<br> |
| "attachmentUrl": "A String",<br> |
| "geo": {<br> |
| "latitude": 3.14,<br> |
| "location": "A String",<br> |
| "longitude": 3.14,<br> |
| },<br> |
| "id": {<br> |
| "seriesId": "A String",<br> |
| "submissionId": "A String",<br> |
| },<br> |
| "counters": {<br> |
| "noneVotes": 42,<br> |
| "minusVotes": 42,<br> |
| "plusVotes": 42,<br> |
| },<br> |
| },<br> |
| ],<br> |
| "kind": "moderator#submissionList",<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> |