anjanms / DubAPI

A Node.js API for creating queup.net bots.
MIT License
20 stars 10 forks source link

Add "getqueue"-method #3

Closed Fuechschen closed 8 years ago

Fuechschen commented 9 years ago

Also for blacklisting, it would be great to have the possibility to check the queue for blacklisted songs.

The endpoints for this would be:

  1. "https://api.dubtrack.fm/room/{roomid}/playlist" to get all users in the queue or
  2. "https://api.dubtrack.fm/room/{roomid}/playlist/details" to get the queue with information about the songs.

The problem about the second one is, that you need to be logged in to request in, so you can't really get it out of the bot script.

anjanms commented 9 years ago

I plan to add queue support in the future. Though I'm hoping the implementation might change, possibly with the UI update.

Right now maintaining the queue state client side would require polling the server whenever the queue changes. Doing this with the /playlist/details endpoint could be an issue due to the amount of data returned and the queue length.

In the meantime, if you really want this data you can queue a request as the bot using bot._.reqHandler.queue