Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -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 | |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 17 | <dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns the specified submission within the specified series.<br> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 18 | <br> |
| 19 | Args:<br> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 20 | lang: string, The language code for the language the client prefers resuls in.<br> |
| 21 | seriesId: integer, The decimal ID of the Series. (required)<br> |
Joe Gregorio | 20a5aa9 | 2011-04-01 17:44:25 -0400 | [diff] [blame] | 22 | includeVotes: boolean, Specifies whether to include the current user's vote<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 23 | submissionId: integer, The decimal ID of the Submission within the Series. (required)<br> |
| 24 | <br> |
| 25 | Returns:<br> |
| 26 | An object of the form<br> |
| 27 | <br> |
| 28 | {<br> |
| 29 | "kind": "moderator#submission",<br> |
| 30 | "attribution": {<br> |
| 31 | "displayName": "A String",<br> |
| 32 | "location": "A String",<br> |
| 33 | "avatarUrl": "A String",<br> |
| 34 | },<br> |
| 35 | "created": "A String",<br> |
| 36 | "text": "A String",<br> |
| 37 | "topics": [<br> |
| 38 | {<br> |
| 39 | "id": {<br> |
| 40 | "seriesId": "A String",<br> |
| 41 | "topicId": "A String",<br> |
| 42 | },<br> |
| 43 | },<br> |
| 44 | ],<br> |
| 45 | "author": "A String",<br> |
| 46 | "translations": [<br> |
| 47 | {<br> |
| 48 | "lang": "A String",<br> |
| 49 | "text": "A String",<br> |
| 50 | },<br> |
| 51 | ],<br> |
| 52 | "parentSubmissionId": {<br> |
| 53 | "seriesId": "A String",<br> |
| 54 | "submissionId": "A String",<br> |
| 55 | },<br> |
| 56 | "vote": {<br> |
| 57 | "vote": "A String",<br> |
| 58 | "flag": "A String",<br> |
| 59 | },<br> |
| 60 | "attachmentUrl": "A String",<br> |
| 61 | "geo": {<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame^] | 62 | "latitude": 3.14,<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 63 | "location": "A String",<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame^] | 64 | "longitude": 3.14,<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 65 | },<br> |
| 66 | "id": {<br> |
| 67 | "seriesId": "A String",<br> |
| 68 | "submissionId": "A String",<br> |
| 69 | },<br> |
| 70 | "counters": {<br> |
| 71 | "noneVotes": 42,<br> |
| 72 | "minusVotes": 42,<br> |
| 73 | "plusVotes": 42,<br> |
| 74 | },<br> |
| 75 | }</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 76 | |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 77 | <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Inserts a new submission in the specified topic within the specified series.<br> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 78 | <br> |
| 79 | Args:<br> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 80 | seriesId: integer, The decimal ID of the Series. (required)<br> |
| 81 | topicId: integer, The decimal ID of the Topic within the Series. (required)<br> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 82 | unauthToken: string, User identifier for unauthenticated usage mode<br> |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 83 | body: object, The request body. (required)<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 84 | The object takes the form of:<br> |
| 85 | <br> |
| 86 | {<br> |
| 87 | "kind": "moderator#submission",<br> |
| 88 | "attribution": {<br> |
| 89 | "displayName": "A String",<br> |
| 90 | "location": "A String",<br> |
| 91 | "avatarUrl": "A String",<br> |
| 92 | },<br> |
| 93 | "created": "A String",<br> |
| 94 | "text": "A String",<br> |
| 95 | "topics": [<br> |
| 96 | {<br> |
| 97 | "id": {<br> |
| 98 | "seriesId": "A String",<br> |
| 99 | "topicId": "A String",<br> |
| 100 | },<br> |
| 101 | },<br> |
| 102 | ],<br> |
| 103 | "author": "A String",<br> |
| 104 | "translations": [<br> |
| 105 | {<br> |
| 106 | "lang": "A String",<br> |
| 107 | "text": "A String",<br> |
| 108 | },<br> |
| 109 | ],<br> |
| 110 | "parentSubmissionId": {<br> |
| 111 | "seriesId": "A String",<br> |
| 112 | "submissionId": "A String",<br> |
| 113 | },<br> |
| 114 | "vote": {<br> |
| 115 | "vote": "A String",<br> |
| 116 | "flag": "A String",<br> |
| 117 | },<br> |
| 118 | "attachmentUrl": "A String",<br> |
| 119 | "geo": {<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame^] | 120 | "latitude": 3.14,<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 121 | "location": "A String",<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame^] | 122 | "longitude": 3.14,<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 123 | },<br> |
| 124 | "id": {<br> |
| 125 | "seriesId": "A String",<br> |
| 126 | "submissionId": "A String",<br> |
| 127 | },<br> |
| 128 | "counters": {<br> |
| 129 | "noneVotes": 42,<br> |
| 130 | "minusVotes": 42,<br> |
| 131 | "plusVotes": 42,<br> |
| 132 | },<br> |
| 133 | }<br> |
| 134 | <br> |
| 135 | anonymous: boolean, Set to true to mark the new submission as anonymous.<br> |
| 136 | <br> |
| 137 | Returns:<br> |
| 138 | An object of the form<br> |
| 139 | <br> |
| 140 | {<br> |
| 141 | "kind": "moderator#submission",<br> |
| 142 | "attribution": {<br> |
| 143 | "displayName": "A String",<br> |
| 144 | "location": "A String",<br> |
| 145 | "avatarUrl": "A String",<br> |
| 146 | },<br> |
| 147 | "created": "A String",<br> |
| 148 | "text": "A String",<br> |
| 149 | "topics": [<br> |
| 150 | {<br> |
| 151 | "id": {<br> |
| 152 | "seriesId": "A String",<br> |
| 153 | "topicId": "A String",<br> |
| 154 | },<br> |
| 155 | },<br> |
| 156 | ],<br> |
| 157 | "author": "A String",<br> |
| 158 | "translations": [<br> |
| 159 | {<br> |
| 160 | "lang": "A String",<br> |
| 161 | "text": "A String",<br> |
| 162 | },<br> |
| 163 | ],<br> |
| 164 | "parentSubmissionId": {<br> |
| 165 | "seriesId": "A String",<br> |
| 166 | "submissionId": "A String",<br> |
| 167 | },<br> |
| 168 | "vote": {<br> |
| 169 | "vote": "A String",<br> |
| 170 | "flag": "A String",<br> |
| 171 | },<br> |
| 172 | "attachmentUrl": "A String",<br> |
| 173 | "geo": {<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame^] | 174 | "latitude": 3.14,<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 175 | "location": "A String",<br> |
Joe Gregorio | 3d55ac5 | 2012-02-21 10:11:19 -0500 | [diff] [blame^] | 176 | "longitude": 3.14,<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 177 | },<br> |
| 178 | "id": {<br> |
| 179 | "seriesId": "A String",<br> |
| 180 | "submissionId": "A String",<br> |
| 181 | },<br> |
| 182 | "counters": {<br> |
| 183 | "noneVotes": 42,<br> |
| 184 | "minusVotes": 42,<br> |
| 185 | "plusVotes": 42,<br> |
| 186 | },<br> |
| 187 | }</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 188 | |
| 189 | <hr> |
| 190 | Data descriptors defined here:<br> |
| 191 | <dl><dt><strong>__dict__</strong></dt> |
| 192 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 193 | </dl> |
| 194 | <dl><dt><strong>__weakref__</strong></dt> |
| 195 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 196 | </dl> |
| 197 | </td></tr></table> |
| 198 | </body></html> |