Skip to content

Instantly share code, notes, and snippets.

@eazyliving
Created October 28, 2017 09:31
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 eazyliving/811a09edffb98bf4b68c750385a9df0c to your computer and use it in GitHub Desktop.
Save eazyliving/811a09edffb98bf4b68c750385a9df0c to your computer and use it in GitHub Desktop.
curl -s "https://api.fyyd.de/0.2/podcast/episodes?podcast_id=45356&count=1" |
egrep -o 'fyyd.de\\/episode\\/[0-9]+' |
awk -F '/' '{print $NF}' |
xargs -n1 -I % curl -H 'Authorization: Bearer TOKEN-HIER-EINFUEGEN' "https://api.fyyd.de/0.2/curate" --data "curation_id=<ID-HIER>&episode_id=%"
@eazyliving
Copy link
Author

This works for every podcast, that links episodes with the help of their fyyd webpages. In this example I use "Der Sendegarten" (https://fyyd.de/podcast/sendegarten-de/0)

line 1: curl fetches the data of the last episode
line 2: find links inside the data linking to fyyd.de/episode
line 3: get the episode's ID
line 4: curl to fyyd's API and add the episode to the curation represented by

that's it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment