This file contains 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
const url = `https://api.bluelytics.com.ar/v2/latest`; | |
const req = new Request(url); | |
const res = await req.loadJSON(); | |
const sellAmount = res.blue.value_sell; | |
const buyAmount = res.blue.value_buy; | |
const i = new Request('https://icons.iconarchive.com/icons/designcontest/ecommerce-business/256/money-icon.png'); | |
const img = await i.loadImage(); | |
let widget = createWidget(buyAmount, sellAmount, img); |