How to use the get function from restler
Find comprehensive JavaScript restler.get code examples handpicked from public code repositorys.
GitHub: daesofamao/exchange
119 120 121 122 123 124 125 126 127 128
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; if (result instanceof Error) { callback(result);
16
26
6
121 122 123 124 125 126 127 128 129 130
} switch(type.toLowerCase()){ case 'post': restRequest = restler.post(url + '?u=0&xt=' + this.cookies['xt'], requestOption); break; default : restRequest = restler.get(url, requestOption); } restRequest.on('complete', function(result, response ) {
6
30
0
GitHub: mjc-gh/nodewar-tools
24 25 26 27 28 29 30 31 32 33
data: { email_or_username: uname, pw: passwd } })); }, load_list:function(){ return http.get(url('file/load_list'), req_options()); }, load:function(sid){ return http.get(url('file/load'), req_options({
2
3
2
+ 3 other calls in file
25 26 27 28 29 30 31 32 33 34
}; 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,
1
1
2
GitHub: ericz/whack
14 15 16 17 18 19 20 21 22 23
Port.on("data", function(data) { if(data !== paused) { var response = {write: write, id: data}; if(!write) { Rest.get(CLOUD + '/store/'+data).on('complete', function(res){ if(sockets[res.type]) { response.data = res; sockets[res.type].send(JSON.stringify(response));
0
1
4
52 53 54 55 56 57 58 59 60 61
prod : ['prod','PROD'] } async.each(URL, function (URLArrayValue, callbackEach) { let token = "Bearer " + authHeader; rest.get(URLArrayValue, { headers: { Authorization: token } }).on('complete', function (resultUsage) { var count = 0; if (resultUsage.error) { callbackEach() } else {
0
0
1
+ 129 other calls in file
GitHub: SHIMER-jpg/msb-codetest
34 35 36 37 38 39 40 41 42 43
// build the API call URL var url = apiUrl + date + '.json?&symbols=' + symbols + '&app_id=' + APP_ID; console.log('Calling OpenExchangeRates API at: ', url); rest.get(url).on('complete', function (result, response) { if (response.statusCode == 200) { var returns = { base: data.base, amount: data.amount,
0
0
1
+ 64 other calls in file
84 85 86 87 88 89 90 91 92 93
// build the API call URL const url = `${apiUrl}historical/${date}.json?&symbols=${symbols}&app_id=${APP_ID}`; console.log(`Calling OpenExchangeRates API at: ${url}`); rest.get(url).on('complete', (result, response) => { if (response.statusCode == 200) { const returns = { base: data.base, amount: data.amount,
0
0
1
+ 107 other calls in file
368 369 370 371 372 373 374 375 376 377
middleName = null; } var DriverDetails = ConUsers.app.models.DriverDetails; var UserRoles = ConUsers.app.models.UserRoles; /* rest.get(mapUrl) .on('complete', function(mapData, mapResponse) { if (mapData.errno == null || mapData.errno == undefined) { if (mapData.result !== null) {*/
0
0
1
+ 149 other calls in file
GitHub: LastMinuteMtp/weather-api
14 15 16 17 18 19 20 21 22 23
tooHot: 30, tooWindy: 50 }; owm.get = function (parameters, callback) { rest.get(owm.url + '?' + parameters + owm.lang + owm.units, {parser: rest.parsers.json}).on('complete', callback); }; app.get('/', function (req, resp) { owm.get('q=Montpellier&lang=fr&mode=html', function (raw) { resp.send(raw); });
0
0
1
28 29 30 31 32 33 34 35 36 37
// Fetch today's name from Svenska dagar function (callback) { var d = new Date(); url = "http://api.dryg.net/dagar/v2/" + d.getFullYear() + "/"; + d.getMonth() + "/" + d.getDate(); rest.get(url, {parser: rest.parsers.json}) .on('complete', function (data) { // Cool, we have a name. Let's update our insult object with it insult.signed = firstElement(firstElement(data.dagar).namnsdag); callback();
0
0
1
+ 7 other calls in file
restler.get is the most popular function in restler (475 examples)