Skip to content

Instantly share code, notes, and snippets.

@plusreed
Last active September 18, 2022 02:46
Show Gist options
  • Save plusreed/0b9bbc39d8912b27d5601d4a574957b1 to your computer and use it in GitHub Desktop.
Save plusreed/0b9bbc39d8912b27d5601d4a574957b1 to your computer and use it in GitHub Desktop.
Tabellarius

🤔

Server implementation is here: plusreed/tabellarius-api

Server -> Client

  • updateTimings
    • Seeds Tabellarius clients with merch message backlog, queue length, live duration (how long WAN has been going on), whether the queue is paused or not, the marquee text and whether it should be displayed or not, queue duration and next merch message timing.
  • sponsorList
    • Updates all Tabellarius clients with a sponsor list.
    • Body is of type Sponsor[].
  • broadcastMessage

Client -> Server

  • createSponsor
    • Adds a new sponsor to the list.
    • Body is of type Sponsor.
  • deleteSponsor
    • By id, deletes a sponsor from the list.
  • displaySponsor
    • Pauses queue and changes banner to sponsor view
  • resumeQueue
    • Resumes the queue after it has been paused
  • toggleMessageToServer
    • Emits broadcastMessage to client.
  • ascendMessage
    • Curates merch message
  • unAscendMessage
    • If message is ascended, removes it from curated list.
  • togglePotentialToServer
    • Moves the message to a "potential" merch message queue.
  • demoAlertToServer
    • Emits a demo broadcastMessage to client.
  • clearMessages
    • Deletes all messages from the queue
  • updateMarqueeShow
    • Toggles whether the marquee text should be shown on the banner
  • updateMarqueeText
    • Updates the text to be shown on the marquee on the banner
  • respondToMessage
    • Based on merch message ID, adds a response to the message and broadcasts the message
  • removeMessage
    • Sets deleted property on merch message to true
  • unRemoveMessage
    • Does the inverse of removeMessage, sets deleted property to false.
  • purgeMessage
    • Removes a message from the backlog. Seems to be a hard delete compared to removeMessage.
  • switchOutro
    • Unknown at this time.
  • updateDiscountShow
    • Whether or not to show a discount code.
  • updateDiscountText
    • Updates the text related to the discount code.

Random Notes

broadcastMessages seem to have a few things which determine how it is shown:

  • if show is defined and is true, the message comes from a user.
  • if response is defined and is true, the message is a reply.
  • if discount is defined and is true, the message is announcing a LTTStore discount.

Enums

LTTColor

One of default, purple, blue, green, orange.

Types

WIP

Sponsor

Property Type Description
id number Sponsor ID
title string Sponsor name
blurb string Sponsor blurb
color LTTColor Color to display sponsor in

ShopifyItem

Property Type Description
quantity number Number of item purchased
title string Item name

BroadcastMessage

Property Type Description
alertMessage string The merch message if a merch message was defined. Otherwise just the default text.
alertColour LTTColor The color of the alert. Seemingly random (or could be based on order total?)
name string Customer name
response boolean Is this broadcast message a response to a merch message?
show boolean Whether this should be shown (I think...?)
timing number Dunno, sorry.
item ShopifyItem Item purchased
discount boolean Determines if the message is supposed to show a discount code for LTTStore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment