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"> |
Joe Gregorio | d67010d | 2012-11-05 08:57:06 -0500 | [diff] [blame] | 83 | <code><a href="freebase_v1.topic.html">topic()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the topic Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Joe Gregorio | 075572b | 2012-07-09 16:53:09 -0400 | [diff] [blame] | 88 | <code><a href="#image">image(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</a></code></p> |
| 89 | <p class="firstline">Returns the scaled/cropped image attached to a freebase node.</p> |
| 90 | <p class="toc_element"> |
| 91 | <code><a href="#image_media">image_media(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</a></code></p> |
| 92 | <p class="firstline">Returns the scaled/cropped image attached to a freebase node.</p> |
| 93 | <p class="toc_element"> |
| 94 | <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> |
| 95 | <p class="firstline">Performs MQL Queries.</p> |
| 96 | <p class="toc_element"> |
| 97 | <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> |
| 98 | <p class="firstline">Performs MQL Queries.</p> |
Joe Gregorio | d67010d | 2012-11-05 08:57:06 -0500 | [diff] [blame] | 99 | <p class="toc_element"> |
| 100 | <code><a href="#mqlwrite">mqlwrite(query, indent=None, callback=None, dateline=None, use_permission_of=None)</a></code></p> |
| 101 | <p class="firstline">Performs MQL Write Operations.</p> |
| 102 | <p class="toc_element"> |
| 103 | <code><a href="#mqlwrite_media">mqlwrite_media(query, indent=None, callback=None, dateline=None, use_permission_of=None)</a></code></p> |
| 104 | <p class="firstline">Performs MQL Write Operations.</p> |
Joe Gregorio | 075572b | 2012-07-09 16:53:09 -0400 | [diff] [blame] | 105 | <h3>Method Details</h3> |
| 106 | <div class="method"> |
| 107 | <code class="details" id="image">image(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</code> |
| 108 | <pre>Returns the scaled/cropped image attached to a freebase node. |
| 109 | |
| 110 | Args: |
| 111 | id: string, Freebase entity or content id, mid, or guid. (required) (repeated) |
| 112 | maxwidth: integer, Maximum width in pixels for resulting image. |
| 113 | maxheight: integer, Maximum height in pixels for resulting image. |
| 114 | fallbackid: string, Use the image associated with this secondary id if no image is associated with the primary id. |
| 115 | pad: boolean, A boolean specifying whether the resulting image should be padded up to the requested dimensions. |
| 116 | mode: string, Method used to scale or crop image. |
| 117 | Allowed values |
| 118 | fill - Fill rectangle completely with image, relax constraint on one dimension if necessary. |
| 119 | fillcrop - Fill rectangle with image, crop image to maintain rectangle dimensions. |
| 120 | fillcropmid - Fill rectangle with image, center horizontally, crop left and right. |
| 121 | fit - Fit image inside rectangle, leave empty space in one dimension if necessary. |
| 122 | </pre> |
| 123 | </div> |
| 124 | |
| 125 | <div class="method"> |
| 126 | <code class="details" id="image_media">image_media(id, maxwidth=None, maxheight=None, fallbackid=None, pad=None, mode=None)</code> |
| 127 | <pre>Returns the scaled/cropped image attached to a freebase node. |
| 128 | |
| 129 | Args: |
| 130 | id: string, Freebase entity or content id, mid, or guid. (required) (repeated) |
| 131 | maxwidth: integer, Maximum width in pixels for resulting image. |
| 132 | maxheight: integer, Maximum height in pixels for resulting image. |
| 133 | fallbackid: string, Use the image associated with this secondary id if no image is associated with the primary id. |
| 134 | pad: boolean, A boolean specifying whether the resulting image should be padded up to the requested dimensions. |
| 135 | mode: string, Method used to scale or crop image. |
| 136 | Allowed values |
| 137 | fill - Fill rectangle completely with image, relax constraint on one dimension if necessary. |
| 138 | fillcrop - Fill rectangle with image, crop image to maintain rectangle dimensions. |
| 139 | fillcropmid - Fill rectangle with image, center horizontally, crop left and right. |
| 140 | fit - Fit image inside rectangle, leave empty space in one dimension if necessary. |
| 141 | </pre> |
| 142 | </div> |
| 143 | |
| 144 | <div class="method"> |
| 145 | <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> |
| 146 | <pre>Performs MQL Queries. |
| 147 | |
| 148 | Args: |
| 149 | query: string, An envelope containing a single MQL query. (required) |
| 150 | lang: string, The language of the results - an id of a /type/lang object. |
| 151 | indent: integer, How many spaces to indent the json. |
| 152 | callback: string, JS method name for JSONP callbacks. |
| 153 | uniqueness_failure: string, How MQL responds to uniqueness failures. |
| 154 | Allowed values |
| 155 | hard - Be strict - throw an error. |
| 156 | soft - Just return the first encountered object. |
| 157 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results. |
| 158 | html_escape: boolean, Whether or not to escape entities. |
| 159 | cursor: string, The mql cursor. |
| 160 | cost: boolean, Show the costs or not. |
| 161 | as_of_time: string, Run the query as it would've been run at the specified point in time. |
| 162 | </pre> |
| 163 | </div> |
| 164 | |
| 165 | <div class="method"> |
| 166 | <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> |
| 167 | <pre>Performs MQL Queries. |
| 168 | |
| 169 | Args: |
| 170 | query: string, An envelope containing a single MQL query. (required) |
| 171 | lang: string, The language of the results - an id of a /type/lang object. |
| 172 | indent: integer, How many spaces to indent the json. |
| 173 | callback: string, JS method name for JSONP callbacks. |
| 174 | uniqueness_failure: string, How MQL responds to uniqueness failures. |
| 175 | Allowed values |
| 176 | hard - Be strict - throw an error. |
| 177 | soft - Just return the first encountered object. |
| 178 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results. |
| 179 | html_escape: boolean, Whether or not to escape entities. |
| 180 | cursor: string, The mql cursor. |
| 181 | cost: boolean, Show the costs or not. |
| 182 | as_of_time: string, Run the query as it would've been run at the specified point in time. |
| 183 | </pre> |
| 184 | </div> |
| 185 | |
Joe Gregorio | d67010d | 2012-11-05 08:57:06 -0500 | [diff] [blame] | 186 | <div class="method"> |
| 187 | <code class="details" id="mqlwrite">mqlwrite(query, indent=None, callback=None, dateline=None, use_permission_of=None)</code> |
| 188 | <pre>Performs MQL Write Operations. |
| 189 | |
| 190 | Args: |
| 191 | query: string, An MQL query with write directives. (required) |
| 192 | indent: integer, How many spaces to indent the json. |
| 193 | callback: string, JS method name for JSONP callbacks. |
| 194 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results. |
| 195 | use_permission_of: string, Use the same permission node of the object with the specified id. |
| 196 | </pre> |
| 197 | </div> |
| 198 | |
| 199 | <div class="method"> |
| 200 | <code class="details" id="mqlwrite_media">mqlwrite_media(query, indent=None, callback=None, dateline=None, use_permission_of=None)</code> |
| 201 | <pre>Performs MQL Write Operations. |
| 202 | |
| 203 | Args: |
| 204 | query: string, An MQL query with write directives. (required) |
| 205 | indent: integer, How many spaces to indent the json. |
| 206 | callback: string, JS method name for JSONP callbacks. |
| 207 | dateline: string, The dateline that you get in a mqlwrite response to ensure consistent results. |
| 208 | use_permission_of: string, Use the same permission node of the object with the specified id. |
| 209 | </pre> |
| 210 | </div> |
| 211 | |
Joe Gregorio | 075572b | 2012-07-09 16:53:09 -0400 | [diff] [blame] | 212 | </body></html> |