Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Hello World 👽

Ignacio Ribes ignacioribes

💭
Hello World 👽
View GitHub Profile
@ignacioribes
ignacioribes / GasPricesWidget.js
Last active Sep 20, 2021
A scriptable Gas Price Widget
View GasPricesWidget.js
const ethGasStationApiUrl = `https://ethgasstation.info/api/ethgasAPI.json`;
const req = new Request(ethGasStationApiUrl);
const res = await req.loadJSON();
if (config.runsInWidget) {
const widget = new ListWidget();
const title = widget.addText("Gas Prices");
title.textColor = Color.white();
title.textOpacity = 0.8;