Skip to content
eddisaur edited this page May 24, 2020 · 9 revisions

API

/api/profiles

Method: GET

Purpose: Get a single user in detail

Return Parameters:

Parameter Name Format Notes
_id String
username String
displayName String
profileUrl String
thumbnail String
spotifyId String
accessToken String should this be visible to frontend?
refreshToken String should this be visible to frontend?

api/lobbies/{id}

Method: GET

Purpose: Get a single lobby in detail

Return Parameters:

Parameter Name Format Notes
_id String
name String
url String shareable link
isPublic Boolean
users array of next
users._id String
users.isAdmin Boolean
songs array of next
songs._id String

api/lobbies/{id}/songs/{id}

Method: GET

Purpose: Get a single song from the current queue in detail

Return parameters:

Parameter Name Format Notes
_id String
title String
artist String
added_by String Who added the song to the playlist
spotifyId String

api/lobbies

Method: POST

Purpose: Create a new lobby

Send parameters:

Parameter Name Format Notes
name String
password String

Return parameters:

Parameter Name Format Notes
lobby array of next
lobby._id String
lobby.name String
lobby.password String

api/lobbies/{id}/songs

Method: PATCH

Purpose: Add a new song to the queue in the lobby

Send Parameters:

Parameter Name Format Notes
spotifyId String

Return parameters:

Parameter Name Format Notes
song array of next
song._id String
song.title String
song.artist String
song.spotifyId String

api/lobbies/{id}/users

Method: PATCH

Purpose: Add a new member to the lobby

Send parameters:

Parameter Name Format Notes
userId String

Return parameters:

Parameter Name Format Notes
user array of next
user._id String
user.username String
user.displayName String
user.thumbnail String

api/lobbies/{id}/songs

Method: DELETE

Purpose: Delete a song from the lobby

Send parameters:

Parameter Name Format Notes
spotifyId String

Clone this wiki locally