How to use the parsers function from restler
Find comprehensive JavaScript restler.parsers code examples handpicked from public code repositorys.
GitHub: daesofamao/exchange

117 118 119 120 121 122 123 124 125 126
} function getStockProfileFromBenzinga(symbol, callback) { symbol = utils.normalizeSymbol(symbol); var options = { parser: restler.parsers.json }; restler.get('http://data.benzinga.com/stock/'+symbol, options).on('complete', function(result) { var profile; var stock;
GitHub: paulohp/node-slideshare

18 19 20 21 22 23 24 25 26 27
}; // Get core parameters required in every API call utils.coreParams = function(api_key, secret) { return { parser: rest.parsers.xml, data: { api_key: api_key, ts: this.timestamp(), hash: this.currentHash(secret)
110 111 112 113 114 115 116 117 118 119
callback = callback || function(){}; option = option || {}; var restRequest = null; var requestOption = { query : option, parser : restler.parsers.json }; requestOption.headers = {}; requestOption.headers['Authorization'] = 'GoogleLogin auth=' + self.googleAuth.getAuthId(); if (body) { requestOption.data = body;
GitHub: mjc-gh/nodewar-tools

7 8 9 10 11 12 13 14 15 16
}; function req_options(obj){ var opts = { headers: { Cookie: 'session='+ config.read() }, parser: http.parsers.json }; for (var i in obj) opts[i] = obj[i];
26 27 28 29 30 31 32 33 34 35
WatchmouseFolder.prototype.endpoints = function(event, callback) { rest.get(this.apiBaseUrl + "/synth/current/" + this.wmCurrent + "/folder/" + this.wmFolder, { parser: rest.parsers.json }).on('success', function(data) { var respBody = { "code": data.code, "endpoints": [ ]
28 29 30 31 32 33 34 35 36 37
if (options.data) { options.data = JSON.stringify(options.data); options.headers['Content-Type'] = 'application/json'; } options.parser = rest.parsers.json; rest.request(this.url(url), options).addListener('success', function(data) { p.emitSuccess(data); }).addListener('error', function(data) {
restler.get is the most popular function in restler (475 examples)