summaryrefslogtreecommitdiffstats
path: root/btcguild/index.js
diff options
context:
space:
mode:
authormakefu <makefu@syntax-fehler.de>2011-06-23 01:11:50 +0200
committermakefu <makefu@syntax-fehler.de>2011-06-23 01:11:50 +0200
commit99bf20b83c5161866e96df918ab1a98a841c4e88 (patch)
tree162bb4350e15552b449c118e426dd11f0fcd056a /btcguild/index.js
parentaf2705c70a245b3f281f7a64039b6d50976fb982 (diff)
parent9ab87e479e1f75665bc69623eeb740758acb3f0a (diff)
merged Makefile, install lmsensors AND tmux
Diffstat (limited to 'btcguild/index.js')
-rw-r--r--btcguild/index.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/btcguild/index.js b/btcguild/index.js
new file mode 100644
index 00000000..1f33db06
--- /dev/null
+++ b/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);
+});