Public
A very early draft of a public api for next.ddr.tools
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

DDR Tools API?

This val (collection of serverless functions) are a rough draft at building a public-facing API for interacting with next.ddr.tools.

All that exists currently is an endpoint to retrieve a raw player name from whatever match is assigned to a specific cab, of a specific event. To use, first copy the URL for a "player 1 name" OBS source from your current event and use that as reference. For example:

https://next.ddr.tools/e/x0al49meVHr97AHKScNRd/cab/default/source/p1-name
                          ^^^ eventId ^^^          ^cabId^

Then, you can use those values to construct a URL for yourself using this pattern:

https://ddr-tools-raw-player-name.val.run/e/:eventId/cab/:cabId/player/:playerIndex

Where :eventId and :cabId are both the values found in your OBS source URL, and :playerIndex is a number starting from zero of the position you're referencing. (e.g. 0 refers to P1 and 1 refers to P2)

The corresponding API endpoint for the example OBS source above would be:

https://ddr-tools-raw-player-name.val.run/e/x0al49meVHr97AHKScNRd/cab/default/player/1

This should return the plain text name of the player in the given position, or nothing at all otherwise.