|
3 | 3 |
|
4 | 4 | (function(){
|
5 | 5 |
|
6 |
| - var CuriousQuery = function() { |
7 |
| - this.terms = []; |
8 |
| - this.relationships = []; |
9 |
| - this.classes = []; |
10 |
| - }; |
11 |
| - |
12 |
| - CuriousQuery.prototype = { |
13 |
| - query: function() { return this.terms.join(' '); }, |
14 |
| - add: function(term, relationship, klass) { |
15 |
| - this.terms.push(term); |
16 |
| - this.relationships.push(relationship); |
17 |
| - this.classes.push(klass); |
18 |
| - return this; |
19 |
| - }, |
20 |
| - }; |
21 |
| - |
22 | 6 | var CuriousObjects = (function() {
|
23 | 7 | function CuriousObject(hash_data) {
|
24 | 8 | this.id = hash_data.id;
|
|
236 | 220 | return http.post(curious_url, args).success(post_cb);
|
237 | 221 | }
|
238 | 222 |
|
239 |
| - function query(query_object, cb, params, tree_cb) { |
240 |
| - var q = query_object.query(); |
241 |
| - __get(q, params, query_object.relationships, query_object.classes, null, cb, tree_cb); |
242 |
| - } |
243 |
| - |
244 | 223 | function get(q, relationships, cb, params, tree_cb) {
|
245 | 224 | return __get(q, params, relationships, null, null, cb, tree_cb);
|
246 | 225 | }
|
|
262 | 241 | }
|
263 | 242 |
|
264 | 243 | return {
|
265 |
| - query: query, |
266 | 244 | get: get,
|
267 | 245 | get_with_objs: get_with_objs,
|
268 | 246 | get_with_start: get_with_start
|
|
274 | 252 | else if (typeof exports !== 'undefined' && exports) { ex = exports; }
|
275 | 253 | ex.CuriousQ = CuriousQ;
|
276 | 254 | ex.CuriousObjects = CuriousObjects;
|
277 |
| - ex.CuriousQuery = CuriousQuery; |
278 |
| - |
279 | 255 | })();
|
0 commit comments