Adds a Sports Scores widget

This commit is contained in:
Alicia Sykes
2021-12-29 12:49:57 +00:00
parent a6b96483eb
commit 5684bf06e8
5 changed files with 429 additions and 9 deletions

View File

@@ -113,6 +113,11 @@ export const getMapUrl = (location, zoom) => {
return `https://www.openstreetmap.org/#map=${zoom || 10}/${location.lat}/${location.lon}`;
};
/* Given a place name, return a link to Google Maps search page */
export const getPlaceUrl = (placeName) => {
return `https://www.google.com/maps/search/${encodeURIComponent(placeName)}`;
};
/* Given a large number, will add commas to make more readable */
export const putCommasInBigNum = (bigNum) => {
const strNum = Number.isNaN(bigNum) ? bigNum : String(bigNum);

View File

@@ -222,6 +222,7 @@ module.exports = {
publicIp: 'http://ip-api.com/json',
readMeStats: 'https://github-readme-stats.vercel.app/api',
rssToJson: 'https://api.rss2json.com/v1/api.json',
sportsScores: 'https://www.thesportsdb.com/api/v1/json',
stockPriceChart: 'https://www.alphavantage.co/query',
tflStatus: 'https://api.tfl.gov.uk/line/mode/tube/status',
weather: 'https://api.openweathermap.org/data/2.5/weather',