Joe Gregorio | 075572b | 2012-07-09 16:53:09 -0400 | [diff] [blame^] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="freebase_v1.html">Freebase API</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="freebase_v1.text.html">text()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the text Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
| 83 | <code><a href="#image">image(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</a></code></p> |
| 84 | <p class="firstline">Returns the scaled/cropped image attached to a freebase node.</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#image_media">image_media(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</a></code></p> |
| 87 | <p class="firstline">Returns the scaled/cropped image attached to a freebase node.</p> |
| 88 | <p class="toc_element"> |
| 89 | <code><a href="#mqlread">mqlread(query, lang=None, indent=None, callback=None, uniqueness_failure=None, dateline=None, html_escape=None, cursor=None, cost=None, as_of_time=None)</a></code></p> |
| 90 | <p class="firstline">Performs MQL Queries.</p> |
| 91 | <p class="toc_element"> |
| 92 | <code><a href="#mqlread_media">mqlread_media(query, lang=None, indent=None, callback=None, uniqueness_failure=None, dateline=None, html_escape=None, cursor=None, cost=None, as_of_time=None)</a></code></p> |
| 93 | <p class="firstline">Performs MQL Queries.</p> |
| 94 | <h3>Method Details</h3> |
| 95 | <div class="method"> |
| 96 | <code class="details" id="image">image(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</code> |
| 97 | <pre>Returns the scaled/cropped image attached to a freebase node. |
| 98 | |
| 99 | Args: |
| 100 | id: string, Freebase entity or content id, mid, or guid. (required) (repeated) |
| 101 | maxwidth: integer, Maximum width in pixels for resulting image. |
| 102 | maxheight: integer, Maximum height in pixels for resulting image. |
| 103 | fallbackid: string, Use the image associated with this secondary id if no image is associated with the primary id. |
| 104 | pad: boolean, A boolean specifying whether the resulting image should be padded up to the requested dimensions. |
| 105 | mode: string, Method used to scale or crop image. |
| 106 | Allowed values |
| 107 | fill - Fill rectangle completely with image, relax constraint on one dimension if necessary. |
| 108 | fillcrop - Fill rectangle with image, crop image to maintain rectangle dimensions. |
| 109 | fillcropmid - Fill rectangle with image, center horizontally, crop left and right. |
| 110 | fit - Fit image inside rectangle, leave empty space in one dimension if necessary. |
| 111 | </pre> |
| 112 | </div> |
| 113 | |
| 114 | <div class="method"> |
| 115 | <code class="details" id="image_media">image_media(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</code> |
| 116 | <pre>Returns the scaled/cropped image attached to a freebase node. |
| 117 | |
| 118 | Args: |
| 119 | id: string, Freebase entity or content id, mid, or guid. (required) (repeated) |
| 120 | maxwidth: integer, Maximum width in pixels for resulting image. |
| 121 | maxheight: integer, Maximum height in pixels for resulting image. |
| 122 | fallbackid: string, Use the image associated with this secondary id if no image is associated with the primary id. |
| 123 | pad: boolean, A boolean specifying whether the resulting image should be padded up to the requested dimensions. |
| 124 | mode: string, Method used to scale or crop image. |
| 125 | Allowed values |
| 126 | fill - Fill rectangle completely with image, relax constraint on one dimension if necessary. |
| 127 | fillcrop - Fill rectangle with image, crop image to maintain rectangle dimensions. |
| 128 | fillcropmid - Fill rectangle with image, center horizontally, crop left and right. |
| 129 | fit - Fit image inside rectangle, leave empty space in one dimension if necessary. |
| 130 | </pre> |
| 131 | </div> |
| 132 | |
| 133 | <div class="method"> |
| 134 | <code class="details" id="mqlread">mqlread(query, lang=None, indent=None, callback=None, uniqueness_failure=None, dateline=None, html_escape=None, cursor=None, cost=None, as_of_time=None)</code> |
| 135 | <pre>Performs MQL Queries. |
| 136 | |
| 137 | Args: |
| 138 | query: string, An envelope containing a single MQL query. (required) |
| 139 | lang: string, The language of the results - an id of a /type/lang object. |
| 140 | indent: integer, How many spaces to indent the json. |
| 141 | callback: string, JS method name for JSONP callbacks. |
| 142 | uniqueness_failure: string, How MQL responds to uniqueness failures. |
| 143 | Allowed values |
| 144 | hard - Be strict - throw an error. |
| 145 | soft - Just return the first encountered object. |
| 146 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results. |
| 147 | html_escape: boolean, Whether or not to escape entities. |
| 148 | cursor: string, The mql cursor. |
| 149 | cost: boolean, Show the costs or not. |
| 150 | as_of_time: string, Run the query as it would've been run at the specified point in time. |
| 151 | </pre> |
| 152 | </div> |
| 153 | |
| 154 | <div class="method"> |
| 155 | <code class="details" id="mqlread_media">mqlread_media(query, lang=None, indent=None, callback=None, uniqueness_failure=None, dateline=None, html_escape=None, cursor=None, cost=None, as_of_time=None)</code> |
| 156 | <pre>Performs MQL Queries. |
| 157 | |
| 158 | Args: |
| 159 | query: string, An envelope containing a single MQL query. (required) |
| 160 | lang: string, The language of the results - an id of a /type/lang object. |
| 161 | indent: integer, How many spaces to indent the json. |
| 162 | callback: string, JS method name for JSONP callbacks. |
| 163 | uniqueness_failure: string, How MQL responds to uniqueness failures. |
| 164 | Allowed values |
| 165 | hard - Be strict - throw an error. |
| 166 | soft - Just return the first encountered object. |
| 167 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results. |
| 168 | html_escape: boolean, Whether or not to escape entities. |
| 169 | cursor: string, The mql cursor. |
| 170 | cost: boolean, Show the costs or not. |
| 171 | as_of_time: string, Run the query as it would've been run at the specified point in time. |
| 172 | </pre> |
| 173 | </div> |
| 174 | |
| 175 | </body></html> |