Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [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-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns blob attached to node at specified id as HTML<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | format: string, Sanitizing transformation.<br> |
| 21 | Allowed values<br> |
| 22 | html - Return valid, sanitized html.<br> |
| 23 | plain - Return plain text - strip html tags.<br> |
| 24 | raw - Return the entire content as-is.<br> |
| 25 | maxlength: integer, The max number of characters to return. Valid only for 'plain' format.<br> |
| 26 | id: string, The id of the item that you want data about (required) (repeated)</tt></dd></dl> |
| 27 | |
| 28 | <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Inserts a blob in the Freebase blobstore.<br> |
| 29 | <br> |
| 30 | Args:<br> |
| 31 | lang: string, The key of a /type/lang object that will be used as the language - e.g. 'fr'<br> |
| 32 | body: object, The request body. (required)<br> |
| 33 | text: string, The text data you want to upload. (required)<br> |
| 34 | text_encoding: string, The encoding of the content - e.g. 'utf-8'<br> |
| 35 | use_permission_of: string, An id of an object that has the permissions that you want to use in the document node.<br> |
| 36 | entity: string, The entity you want to upload a description about.<br> |
| 37 | content: string, An id of a /type/content object that should be the last content attached to the document node specified. This is a consistency check and will make sure that the content has not changed since the request was created. The document parameter must also be passed if this is present.<br> |
| 38 | media_type: string, The mime content type of the text you are uploading - e.g. text/plain (required)<br> |
| 39 | document: string, An id of a /common/document object that you'd like to attach this content.</tt></dd></dl> |
| 40 | |
| 41 | <hr> |
| 42 | Data descriptors defined here:<br> |
| 43 | <dl><dt><strong>__dict__</strong></dt> |
| 44 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 45 | </dl> |
| 46 | <dl><dt><strong>__weakref__</strong></dt> |
| 47 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 48 | </dl> |
| 49 | </td></tr></table> |
| 50 | </body></html> |