diff options
author | makefu <github@syntax-fehler.de> | 2011-08-24 17:53:11 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-08-24 17:53:11 +0200 |
commit | 9a2947575515fe070fb63e640007f4d4ed952f85 (patch) | |
tree | 63d2085927916eaa955e37255ee04cb54930d0a1 /gold/btcguild | |
parent | bc901adc1441d6f11c53dacb5bbca7acdcf03361 (diff) | |
parent | 7c18a3d4e5897adb4ddd141aed261ce63daf1a10 (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'gold/btcguild')
-rw-r--r-- | gold/btcguild/index.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gold/btcguild/index.js b/gold/btcguild/index.js new file mode 100644 index 00000000..1f33db06 --- /dev/null +++ b/gold/btcguild/index.js @@ -0,0 +1,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); +}); |