Skip to content

Instantly share code, notes, and snippets.

@Pent
Last active December 23, 2015 05:29
Show Gist options
  • Select an option

  • Save Pent/6587058 to your computer and use it in GitHub Desktop.

Select an option

Save Pent/6587058 to your computer and use it in GitHub Desktop.
api call example
Meteor.methods({
btce: function(to) {
var str = '';
Meteor.http.get('https://btc-e.com/api/2/btc_usd/ticker', function(error, response) {
if (response.statusCode === 200) {
var data = response.content;
data = JSON.parse(data);
if(data.ticker) {
return ("BTC-E: BTC->USD: [" + data.ticker.avg + "]");
}
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment