Skip to content
Node.js Web API for the Disco app platform
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
static
.gitignore
README.md
SpotifyManager.js
event.js
package.json
server.js
song.js

README.md

Disco-Web

API Endpoints

POST {{url}}/api/events/create

Creates a new event

Request: { “name”: {{event_name}} } Response: { “secret”: {{event_secret}}}

GET {{url}}/api/events/{{event_id}}

Gets the name of an event with an event ID

Response: { “name”: {{event_name}} }

POST {{url}}/api/events/{{event_id}}/join

User can join an event by specifying the event ID

Request: { “fullname”: {{full_name}} }

GET {{url}}/api/events/{{event_id}}/songs

Gets a list of all songs from an event ID

Response: { “name”: {{song_name}}, “artist”: {{song_artist}}, “id”, {{spotify_id}}}

POST {{url}}/api/events/{{events_id}}/songs

Add a new song to the queue

Request: { “name”: {{song_name}}, “artist”: {{song_artist}}, “id”, {{spotify_id}}, “urlAlbumArt”: {{url_album_art}}, “boostRating”: {{boost_rating}}} Response: { “name”: {{song_name}}, “artist”: {{song_artist}}, “id”, {{spotify_id}}, “urlAlbumArt”: {{url_album_art}}, “boostRating”: {{boost_rating}}}

PUT {{url}}/api/events/{{events_id}}/songs/{{song_id}}/boost

Boosts a song

Response: { “name”: {{song_name}}, “artist”: {{song_artist}}, “id”, {{spotify_id}}, “urlAlbumArt”: {{url_album_art}}, “boostRating”: {{boost_rating}}}

GET {{url}}/api/events/{{event_id}}/pop

Gets next song in queue and removes it from array

Response: { “name”: {{song_name}}, “artist”: {{song_artist}}, “id”, {{spotify_id}}, “urlAlbumArt”: {{url_album_art}}, “boostRating”: {{boost_rating}}}

GET {{url}}/api/events/{{event_id}}/current

Gets the event's current song

Response: { “name”: {{song_name}}, “artist”: {{song_artist}}, “id”, {{spotify_id}}, “urlAlbumArt”: {{url_album_art}}, “boostRating”: {{boost_rating}}}

You can’t perform that action at this time.