Created
October 28, 2017 09:31
-
-
Save eazyliving/811a09edffb98bf4b68c750385a9df0c to your computer and use it in GitHub Desktop.
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
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=%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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