Skip to content

Instantly share code, notes, and snippets.

@allesmatze
allesmatze / freeParkingSpaces.js
Created October 21, 2020 10:34
Outletcity Parkplätze Widget für Scriptable App
const apiUrl = `https://appbackend.outletcity.com/v1_1/public/parkingUtilisation`
let widget = await createWidget()
if (!config.runsInWidget) {
await widget.presentMedium()
}
Script.setWidget(widget)
Script.complete()
@allesmatze
allesmatze / incidence.js
Last active October 21, 2020 16:26 — forked from kevinkub/incidence.js
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
const apiUrl = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=GEN,cases7_per_100k,cases&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
let widget = await createWidget()
if (!config.runsInWidget) {
await widget.presentSmall()
}
Script.setWidget(widget)
Script.complete()