flytrack
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "flytrack", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "track flights and more using an api key", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -9,23 +9,13 @@ // FLYTRACK ALLGLOBALFLIGHTINFO FILE | ||
// make sure apikey is a string | ||
if (typeof apikey != 'string') { | ||
apikey = JSON.stringify(apikey) | ||
} | ||
var requestInfo = { | ||
url: '//aviation-edge.com/api/public/flights?key=' + apikey + '&limit=30000' | ||
} | ||
function callback(error, response, body) { | ||
if (!error && response.statusCode == 200) { | ||
var info = JSON.parse(body); | ||
console.log(body) | ||
console.log(info) | ||
console.log(response.statusCode) | ||
} | ||
} | ||
http(requestInfo, callback) | ||
if (typeof apikey != 'string') apikey = JSON.stringify(apikey) | ||
http('//aviation-edge.com/api/public/flights?key=' + apikey + '&limit=30000', function (error, response, body) { | ||
if (error) { | ||
console.warn('error:', error); | ||
} | ||
console.log('statusCode: ', response && response.statusCode) | ||
console.log('body: ', body) | ||
} | ||
} | ||
module.exports.get = Main; |
5420
24