Luke Childs
8 years ago
3 changed files with 2 additions and 23 deletions
@ -1,20 +0,0 @@ |
|||
const rp = require('request-promise'); |
|||
|
|||
const baseUrl = 'https://onionoo.torproject.org/'; |
|||
const endpoints = [ |
|||
'summary', |
|||
'details', |
|||
'bandwidth', |
|||
'weights', |
|||
'clients', |
|||
'uptime' |
|||
]; |
|||
|
|||
module.exports = endpoints.reduce((onionoo, endpoint) => { |
|||
onionoo[endpoint] = args => rp({ |
|||
uri: `${baseUrl}${endpoint}`, |
|||
qs: args, |
|||
json: true |
|||
}); |
|||
return onionoo; |
|||
}, {}); |
Loading…
Reference in new issue