Stimmen und Favoriten
Erstelle und liste Stimmen oder Favoriten für Bilder.
Favoriten auflisten
curl -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/favourites
Einen Favoriten erstellen
curl -X POST -H "Content-Type: application/json" -H "x-api-key: YOUR-API-KEY" \
-d '{"image_id": "KWdLHmOqc"}' \
https://api.thecatapi.com/v1/favourites
Für ein Bild abstimmen
curl -X POST -H "Content-Type: application/json" -H "x-api-key: YOUR-API-KEY" \
-d '{"image_id": "KWdLHmOqc", "value": 1}' \
https://api.thecatapi.com/v1/votes
Einen Favoriten abrufen
curl -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/favourites/FAVOURITE_ID
Einen Favoriten löschen
curl -X DELETE -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/favourites/FAVOURITE_ID
Stimmen auflisten
curl -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/votes
Eine Stimme abrufen
curl -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/votes/VOTE_ID
Stimmen können nicht gelöscht werden. Um eine Stimme umzukehren, gib eine neue Stimme mit dem entgegengesetzten value ab.