API docs

prod.kr contains many API endpoints that can be used to fetch and manipulate data from an automated source.

  • GET prod.kr/api/chat

    gets the N most recent chat messages. contains user idenfier, message identifier, emotes used and the source of the message (twitch, discord, irc, web, etc)

    ?count=NUMBER (optional, default: 100)

  • GET prod.kr/api/screen

    fetches screen related values

    ?subject=ENUM (required)

    allowed values:

    • windowcount: number of windows

    • chatcount: number of chats

    • pointercount: number of pointers

    • palette: current palette swap data

    • accessory: current list of enabled accessory

    • guys: currently active list of guys

    • camera: current camera settings

    • flip: whether the chatbox is on left or right

    • volume: current volume data per category

    • tracker: last tracker data in base64

  • GET prod.kr/api/stream

    fetches stream related values

    ?subject=ENUM (required)

    allowed values:

    • title: current title of the broadcast

    • subject: current !today of the broadcast

    • phase: current phase of the broadcast (incremented with !marker)

    • category: current stream category

    • uptime: the runtime of the current stream

    • gcp/gcp2/gcp3: current gcp values

    • coherence: coherence between gcp values

  • GET prod.kr/api/wasd

    does WASD.pack() and WASD.unpack() for those who do not have access or will be difficult implementing WASD on their environment

    ?action=ENUM (required, allowed values: "pack", "unpack")

    ?text=STRING (required)

  • GET prod.kr/api/user

    queries user data according to the pattern.

    ?select=PATH (optional, by default shows all)

    PATH must be a valid path in user data (such as twitch.login), and can be comma-separated for multiple.

    you may also attach a "rankby:" or "rankby:desc:" at the beginning to rank by this element without affecting the order (such as ?select=twitch.id,rankby:desc:clonkspotting.boost)

    ?where=CONDITION (optional, by default shows all)

    CONDITION can be comma separated and only the entries that fulfill all will be displayed.

    CONDITION is written as either PATH or PATH OPERATOR OPERAND.

    just PATH: whether this path exists in this user

    PATH=OBJECT: whether the path equals this object

    !=, > < >=, <= is also available for querying.

    ?orderby=PATH (optional, by default sorts by twitch id)

    unlike the rest, PATH cannot be comma separated. orders the list based on PATH.

    include the "rank" in ?select to see the rank of the current order.

    ?desc=true (optional, by default sorts ascending)

    makes the search descending.

    ?count=NUMBER (optional, by default shows all)

    counts the number of entries to show at the end.

  • GET prod.kr/api/auth

    generates a password to be used.

    ?login=STRING (optional, by default shows all)

    use the "!genkey" command to generate a key, and feel free to utilize them to call commands and chat messages.

  • POST prod.kr/api/chat

    sends message as if its on twitch chat.

    ?id=STRING (optional, by default calls command by "anonymous" with no permission)

    ?pw=STRING (optional)

    ?text=STRING (required)

  • Mastodon Mastodon 2