Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -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-image"><strong>image</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns the scaled/cropped image attached to a freebase node.<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | maxwidth: integer, Maximum width in pixels for resulting image.<br> |
| 21 | maxheight: integer, Maximum height in pixels for resulting image.<br> |
| 22 | fallbackid: string, Use the image associated with this secondary id if no image is associated with the primary id.<br> |
| 23 | pad: boolean, A boolean specifying whether the resulting image should be padded up to the requested dimensions.<br> |
| 24 | mode: string, Method used to scale or crop image.<br> |
| 25 | Allowed values<br> |
| 26 | fill - TODO(bendrees)<br> |
| 27 | fillcrop - TODO(bendrees)<br> |
| 28 | fillcropmid - TODO(bendrees)<br> |
| 29 | fit - TODO(bendrees)<br> |
| 30 | id: string, Freebase entity or content id, mid, or guid. (required) (repeated)</tt></dd></dl> |
| 31 | |
| 32 | <dl><dt><a name="Resource-mqlread"><strong>mqlread</strong></a> = method(self, **kwargs)</dt><dd><tt>Performs MQL Queries.<br> |
| 33 | <br> |
| 34 | Args:<br> |
| 35 | lang: string, The language of the results - an id of a /type/lang object.<br> |
| 36 | cursor: string, The mql cursor.<br> |
| 37 | indent: integer, How many spaces to indent the json.<br> |
| 38 | callback: string, JS method name for JSONP callbacks.<br> |
| 39 | uniqueness_failure: string, How MQL responds to uniqueness failures.<br> |
| 40 | Allowed values<br> |
| 41 | hard - Be strict - throw an error.<br> |
| 42 | soft - Just return the first encountered object.<br> |
Joe Gregorio | 2401bd6 | 2011-12-15 09:18:49 -0500 | [diff] [blame^] | 43 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results.<br> |
Joe Gregorio | 761c456 | 2011-10-28 14:36:24 -0400 | [diff] [blame] | 44 | html_escape: boolean, Whether or not to escape entities.<br> |
| 45 | cost: boolean, Show the costs or not.<br> |
| 46 | query: string, An envelope containing a single MQL query. (required)<br> |
| 47 | as_of_time: string, Run the query as it would've been run at the specified point in time.</tt></dd></dl> |
| 48 | |
| 49 | <dl><dt><a name="Resource-text"><strong><a href="freebase.v1.text.html">text</a></strong></a> = methodResource(self)</dt><dd><tt>A collection resource.</tt></dd></dl> |
| 50 | |
| 51 | <hr> |
| 52 | Data descriptors defined here:<br> |
| 53 | <dl><dt><strong>__dict__</strong></dt> |
| 54 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 55 | </dl> |
| 56 | <dl><dt><strong>__weakref__</strong></dt> |
| 57 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 58 | </dl> |
| 59 | </td></tr></table> |
| 60 | </body></html> |