blob: 1f33db0657fc27422b59ed415a99de68c0d3244c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
api_key = process.env.api_key;
var options = {
host: 'www.btcguild.com',
port: 80,
path: '/api.php?api_key=' + api_key
};
http = require('http');
http.get(options, function(res) {
var data = '';
res.on('data', function (chunk) {
data += chunk;
});
res.on('end', function () {
console.log(JSON.parse(data));
});
}).on('error', function(e) {
console.error('Error: ' + e.message);
});
|