Wukong is a web-based music sharing platform which is implemented in C# and JavaScript. The application allows users to share and listen their favorite songs together.
- We currently only support Google OAuth. More will be added soon.
- Google OAuth
/oauth/google
Using APIs under /api
endpoint requires authentication.
The APIs under channel
section controls the main logic of Wukong service.
Join a channel using channel ID. Joining a new channel will leave the previous channel automatically.
- siteId
- songId
If half of the listeners have downvoted, the current song will be stopped and play next song immediately.
The frontend should report when the current song finishes.
The APIs under /song
sections serves as a middleware between Wukong backend and Wukong providers so that provider can be added effortlessly without modifying any backend logic.
- key
- list
- artist
- album
- artwork
- title
- siteId
- songId
- userName
- id
- avatar
- name
- list
- artist
- album
- artwork
- title
- siteId
- songId
- length
- name
- list
- songId
- siteId
- [id]
WebSocket endpoint is used to create an interactive communication between clients and backends.
- eventName - "Play"
- song
- artist
- album
- artwork
- title
- siteId
- songId
- length - double
- file
- elapsed - double
- user
A client should always stop the already playing track and start playing another when 'Play' event is received.
- eventName - "UserListUpdated"
- users - list
- userName
- id
- avarta
- eventName = "NextSongUpdated"
- song
- artist
- album
- artwork
- title
- siteId
- songId
- length - double
- file
- HTTP status code 401 will be sent in response to unauthenticated requests.
- Clients should connect the WebSocket endpoint immediately after joining a channel to receive messages from it. Clients that being disconnected for a period of time will be removed from the channel.