require 'net/http' require 'json' url = "https://api.currencyapi.com/v3/latest?apikey=YOUR-API-KEY" uri = URI(url) response = Net::HTTP.get(uri) response_obj = JSON.parse(response) rate = response_obj['data']
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter