-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest.js
More file actions
29 lines (24 loc) · 668 Bytes
/
test.js
File metadata and controls
29 lines (24 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// var request = require('request');
// var baseUrl = "http://api.spotcrime.com/crimes.json";
// var key = "privatekeyforspotcrimepublicusers-commercialuse-877.410.1607";
// module.exports = function(loc, radius, cb) {
// if (typeof radius === 'function') {
// cb = radius;
// radius = 0.01;
// }
// var rOpt = {
// url: baseUrl,
// json: true,
// qs: {
// lat: loc.lat,
// lon: loc.lon,
// key: key,
// radius: radius
// }
// };
// request(rOpt, function(err, res, body) {
// if (err) return cb(err);
// if (!body) return cb(new Error("No response"));
// cb(null, body.crimes);
// });
// };