Favorites
Favorite a song
Type: POST
Route: /favorites/{id}
1
2
2
URI Parameters
Name: id
Type: String
Required: True
1
2
3
2
3
Response 204
Possible errors
# Code 400
{ "message": "No params provided." }
{ "message": "Invalid params provided." }
# Code 403
{ "message": "Not authorized." }
# Code 404
{ "message": "No song found." }
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Delete a favorited song
Type: DELETE
Route: /favorites/{id}
1
2
2
URI Parameters
Name: id
Type: String
Required: True
1
2
3
2
3
Response 204
Possible errors
# Code 400
{ "message": "No params provided." }
{ "message": "Invalid params provided." }
# Code 403
{ "message": "Not authorized." }
# Code 404
{ "message": "No song found." }
{ "message": "No favorite found." }
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Get favorite songs
Type: GET
Route: /favorites/{username}
1
2
2
URI Parameters
Name: username
Type: String
Required: True
1
2
3
2
3
Response 200
{
"message": "Successfully retrieved favorites.",
"favorites": [
{
"albums": [
{
"id": 1,
"name": "Märchen EP",
"nameRomaji": null,
"image": "Märchen-EP_cover.jpg",
"releaseDate": "1970-01-01T00:00:00.000Z"
},
...
],
"artists": [
{
"id": 1,
"name": "Aiobahn",
"nameRomaji": null,
"image": null
},
...
],
"duration": 176,
"groups": [],
"id": 1,
"lastPlayed": "1970-01-01T00:00:00.000Z",
"notes": null,
"source": [],
"tags": [],
"title": "ヘンゼルとグレーテルの森",
"uploader": {
"uuid": ,
"username": "testuser",
"displayName": "TestUser"
}
},
...
]
}
# or
{
"message": "This user does not have any favorites.",
"favorites": []
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Possible errors
# Code 400
{ "message": "No params provided." }
{ "message": "Invalid params provided." }
{ "message": "Not a valid username." }
# Code 403
{ "message": "Not authorized." }
# Code 404
{ "message": "No user found." }
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Add tags to a favorite
Adding tags to a song is a great way of keeping track of a specific group of songs. Only you can see your tags and they are taken into account when fetching the song list.
Type: PUT
Route: /favorites/{id}/tags
1
2
2
URI Parameters
Name: id
Type: String
Required: True
1
2
3
2
3
Body
{
"tags": [
"an",
"array",
"of",
"tags"
]
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Response 200
{
"message": "Successfully updated tags on favorite.",
"tags": [
"an",
"array",
"of",
"tags"
]
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Possible errors
# Code 400
{ "message": "No params provided." }
{ "message": "Invalid params provided." }
{ "message": "No body provided." }
{ "message": "Invalid body provided." }
# Code 403
{ "message": "Not authorized." }
# Code 404
{ "message": "No favorite found." }
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11