LEFT | RIGHT |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 /** | 3 /** |
4 * Provide the CharmStore class. | 4 * Provide the CharmStore class. |
5 * | 5 * |
6 * @module store | 6 * @module store |
7 * @submodule store.charm | 7 * @submodule store.charm |
8 */ | 8 */ |
9 | 9 |
10 YUI.add('juju-charm-store', function(Y) { | 10 YUI.add('juju-charm-store', function(Y) { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 callbacks.failure = Y.bind(callbacks.failure, bindScope); | 198 callbacks.failure = Y.bind(callbacks.failure, bindScope); |
199 } | 199 } |
200 | 200 |
201 this._makeRequest(endpoint, callbacks); | 201 this._makeRequest(endpoint, callbacks); |
202 }, | 202 }, |
203 | 203 |
204 /** | 204 /** |
205 * Api call to search charms | 205 * Api call to search charms |
206 * | 206 * |
207 * @method search | 207 * @method search |
208 * @param {String} text the search text. | 208 * @param {Object} filters the filters data object for search. |
209 * @param {Object} callbacks the success/failure callbacks to use. | 209 * @param {Object} callbacks the success/failure callbacks to use. |
210 * @param {Object} bindScope the scope of *this* in the callbacks. | 210 * @param {Object} bindScope the scope of *this* in the callbacks. |
211 */ | 211 */ |
212 search: function(filters, callbacks, bindScope) { | 212 search: function(filters, callbacks, bindScope) { |
213 var endpoint = 'charms'; | 213 var endpoint = 'charms'; |
214 if (bindScope) { | 214 if (bindScope) { |
215 callbacks.success = Y.bind(callbacks.success, bindScope); | 215 callbacks.success = Y.bind(callbacks.success, bindScope); |
216 callbacks.failure = Y.bind(callbacks.failure, bindScope); | 216 callbacks.failure = Y.bind(callbacks.failure, bindScope); |
217 } | 217 } |
218 this._makeRequest(endpoint, callbacks, filters); | 218 this._makeRequest(endpoint, callbacks, filters); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 }); | 346 }); |
347 | 347 |
348 }, '0.1.0', { | 348 }, '0.1.0', { |
349 requires: [ | 349 requires: [ |
350 'datasource-io', | 350 'datasource-io', |
351 'json-parse', | 351 'json-parse', |
352 'juju-charm-models', | 352 'juju-charm-models', |
353 'querystring-stringify' | 353 'querystring-stringify' |
354 ] | 354 ] |
355 }); | 355 }); |
LEFT | RIGHT |