nkd.su

next neko desu: september 30th

Endpoints

The root of the API is nkd.su/api/. The following endpoints are available:

/week/<yyyy>-<mm>-<dd>/

Information from a particular week. The week returned will be the week that was in progress at midnight on the morning of the day specified.

Includes:

  • votes: a list of votes placed
  • playlist: a list of tracks played and the times at which they were played
  • added: a list of all the tracks added to the library this week
  • start: the date and time at which this week started
  • finish: the date and time at which this week ended
  • showtime: the date and time at which this week's show began
  • broadcasting: if this show is on the air at the time of the request
  • message_markdown and message_html: the message shown on the front page during the week containing this show

/week/

A redirect to the week containing the most recent complete show.

/

Information about the week in progress.

/track/<track_id>/

Information about a particular track, including metadata and a list of every play on record.

Note that the plays list is only included for tracks in calls to /track/<track_id>; tracks returned as part of other endpoints will not have plays listed.

/search/?q=query

Return a list of track objects matching q, using the same machinery as the search box on the website.

More things

If you're going to create tweets for voters, make sure that '@nkdsu' appears at the start of the vote tweet. Right now, URLs are constructed in a particular way and can fall anywhere within a vote tweet, but this is subject to change. To be safe, keep the URLs before any text and use the url value provided in track objects.

If there is something else you want added or changed, or if you find something that's broken, file a bug or just yell at me on Twitter.