$ pip install -r requirements.txt
Create a .env in the root of the project based on sample.env
.
$ python manage.py populate_db
$ python manage.py runserver
Deployed to https://soundem-api.herokuapp.com
Request
{
"email": "[email protected]",
"password": "abc123"
}
Response
{
"user": {
"email": "[email protected]",
"id": 1,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MX0.G01VbljXYZa-Cfd-HveE4U0mHGFLrgo36M838S3K5RE"
}
}
Request
{
"email": "[email protected]",
"password": "abc123"
}
Response
{
"user": {
"email": "[email protected]",
"id": 1,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MX0.G01VbljXYZa-Cfd-HveE4U0mHGFLrgo36M838S3K5RE"
}
}
Response
{
"artists": [
{
"albums": [
1
],
"bio": "",
"id": 1,
"name": "Lana del Rey"
},
{
"albums": [
2
],
"bio": "",
"id": 2,
"name": "AJ Davila"
}
]
}
Response
{
"albums": [
{
"id": 1,
"name": "Ultraviolence",
"songs": [
1,
2,
3
]
},
{
"id": 2,
"name": "Terror Amor",
"songs": [
4,
5
]
}
]
}
Response
{
"songs": [
{
"album": 1,
"favorite": false,
"id": 1,
"name": "Pretty When You Cry"
},
{
"album": 1,
"favorite": false,
"id": 2,
"name": "Money Power Glory"
},
{
"album": 1,
"favorite": false,
"id": 3,
"name": "West Coast"
},
{
"album": 2,
"favorite": false,
"id": 4,
"name": "Animal"
},
{
"album": 2,
"favorite": false,
"id": 5,
"name": "Dura Como Piedra"
}
]
}
Response
{
"song": {
"album": 1,
"favorite": true,
"id": 1,
"name": "Pretty When You Cry"
}
}