Repository navigation
API
eddisaur edited this page May 24, 2020
·
9 revisions
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? |
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 |
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 |
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 |
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 |
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 |
Method: DELETE
Purpose: Delete a song from the lobby
Send parameters:
| Parameter Name | Format | Notes |
|---|---|---|
| spotifyId | String |
- Home
- Proposal
- Meeting Minutes
- Misc
- Architecture
- Tools & Technology
- Testing
- Future Work