Created
July 21, 2017 00:50
-
-
Save rdegges/ec3e406894e36b350ae5aed17b479cd2 to your computer and use it in GitHub Desktop.
Crypto Compare Vue app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Our Vue.js application. | |
* | |
* This manages the entire front-end website. | |
*/ | |
// The API we're using for grabbing metadata about each cryptocurrency | |
// (including logo images). The service can be found at: | |
// https://www.cryptocompare.com/api/ | |
let CRYPTOCOMPARE_API_URI = "https://www.cryptocompare.com"; | |
// The API we're using for grabbing cryptocurrency prices. The service can be | |
// found at: https://coinmarketcap.com/api/ | |
let COINMARKETCAP_API_URI = "https://api.coinmarketcap.com"; | |
// The amount of milliseconds (ms) after which we should update our currency | |
// charts. | |
let UPDATE_INTERVAL = 60 * 1000; | |
let app = new Vue({ | |
el: "#app", | |
data: { | |
coins: [], | |
coinData: {} | |
}, | |
methods: { | |
/** | |
* Load up all cryptocurrency data. This data is used to find what logos | |
* each currency has, so we can display things in a friendly way. | |
*/ | |
getCoinData: function() { | |
}, | |
/** | |
* Get the top 10 cryptocurrencies by value. This data is refreshed each 5 | |
* minutes by the backing API service. | |
*/ | |
getCoins: function() { | |
}, | |
/** | |
* Given a cryptocurrency ticket symbol, return the currency's logo | |
* image. | |
*/ | |
getCoinImage: function(symbol) { | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment