This builds on my previous addition of the "getApiObj" functionality
Streamlined getting of rates.
User doesn't need to worry about api vs web, currency variables all set the same now.
Modified instructions to refer user to both api & web url for finding coin id.
Modified getRate to check if passed currencyId exists in previously fetched apiObj
Added getSingleRate, called if currencyId not in apiObj, calls api for that id.
If by chance we still get error, calls getWebRate.
Modified getWebRate to return only the rate, not array with rate + 'USD'
Have not implemented any error checking in getWebRate, that could be done.
This builds on my previous addition of the "getApiObj" functionality Streamlined getting of rates. User doesn't need to worry about api vs web, currency variables all set the same now.
Have not implemented any error checking in getWebRate, that could be done.