Skip to content

Instantly share code, notes, and snippets.

kunaldua / FootballFixtures.js
Last active Nov 14, 2020
Show the latest result/ upcoming fixtures of football (soccer) teams using API
View FootballFixtures.js
// Based almost entirely on the work of
const teamId = 133811; // Replace this with your team's ID — find the team page on, e.g. Arsenal's page is so their teamID is 133604
const teamDetailUrl = "";
const leagueDetailUrl = ""
const teamUrl = teamDetailUrl + teamId;
let r = new Request(teamUrl);
let teamDetail = await r.loadJSON();
View SLDepartures.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: bus-alt;
// Script to show real time SL departure information using the SL real-time API
// Todo: Pass siteID and StopPointNumber as arguments
const siteID = "9001" // 9001 is T-Centralen, replace with your station's ID. See:
const myKey = "thekey" // Replace with your key, get it from
const timeWindow = "30" // Show departures in the next 30 minutes