Last active
October 8, 2021 05:59
-
-
Save Far-Se/ace03a459515f1150a935bba0b5cbb01 to your computer and use it in GitHub Desktop.
Upcoming TV Shows
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
(async()=>{ | |
let json = await (await fetch('https://api.tvmaze.com/schedule/full')).json(), | |
data = []; | |
(json.filter(d=>d._embedded.show.rating.average && d.number === 1 && d._embedded.show.network?.country.code === "US")) | |
.forEach(d=>data.push({title:d._embedded.show.name, season:d.season, airdate:d.airdate, type:d._embedded.show.type, genre:d._embedded.show.genres.join(", "), rating:d._embedded.show.rating?.average})); | |
console.clear(); | |
console.table(data); | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment