Developed to mess around with APIs and songs that I like.
https://songs-i-like.herokuapp.com/
FastAPI, Postgres are used.
Example project:
listen-this-today.herokuapp.com
Can be viewed in /docs
Brings all songs saved.
Curl
curl -X 'GET' \
'https://songs-i-like.herokuapp.com/api/songs' \
-H 'accept: application/json'
Example response: 200 OK
[
{
"id":1,
"artistName":"Men I Trust",
"songName":"Lauren"
},
{
"id":2,
"artistName":"Tame Impala",
"songName":"The Less I Know the Better"
},
...
]
Adds a new song.
Example request body:
{
"artistName": "Mor ve Otesi",
"songName": "Bazen"
}
Then response: 201 Created
{
"id": 57,
"artistName": "Mor ve Otesi",
"songName": "Bazen"
}
Updates a song with id.
Example request body:
PUT /api/song/57
{
"artistName": "Mor ve Otesi",
"songName": "Gul Kendine"
}
Then response: 200
{
"id": 57,
"artistName": "Mor ve Otesi",
"songName": "Gul Kendine"
}
Deletes a song with id.
Example request:
curl -X 'DELETE' \
'https://songs-i-like.herokuapp.com/api/song/57' \
-H 'accept: application/json'
Then response: 200
{
"artistName": "Mor ve Otesi",
"songName": "Gul Kendine",
"id": 57
}