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
/** | |
* Script for scriptable to get the current capacity of McFit Gyms | |
*/ | |
let gymId = 1731068920 | |
let param = args.widgetParameter | |
if (param != null && param.length > 0) { | |
gymId = param | |
} | |
const currentGymCapacity = await fetchGymCapacity(gymId) |
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 apiUrl = "https://pass.telekom.de/api/service/generic/v1/status" | |
let widget = await createWidget() | |
widget.backgroundColor = new Color("#777777") | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) | |
Script.complete() |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: pink; icon-glyph: exchange-alt; | |
const DEBUG = false | |
const log = DEBUG ? console.log.bind(console) : function () { }; | |
// configure the library | |
const libraryInfo = { | |
name: 'TelekomDataUsageLibrary', | |
version: '1.0.3', |