Skip to content

Instantly share code, notes, and snippets.

@Far-Se
Last active October 8, 2021 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Far-Se/ace03a459515f1150a935bba0b5cbb01 to your computer and use it in GitHub Desktop.
Save Far-Se/ace03a459515f1150a935bba0b5cbb01 to your computer and use it in GitHub Desktop.
Upcoming TV Shows
(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