Skip to content

API Protocol

Yessc edited this page Nov 12, 2025 · 1 revision

API Protocols d'Accions

SERVER CALLS

  • "salutation": -> Initial message that server sends when a client connects (Broadcast)

    • "value" : String -> "Hola"
  • "clientsList": -> List with all clients connected (Send after register a new client)

    • "clients" : List<"ClientData">
  • "configuration" -> Send Raspberry Pi configuration

    • "value" : Configuration
  • "countdown": -> Send countdown message to all players (Broadcast)

    • "value" : int
  • "initialPosition": -> Send its initial positions to every client (Broadcast)

    • "objects" : List<"GameObject">
  • "serverData": -> Send updated positions and values for gameobjects in Play Views (Broadcast)

    • "objects" : List<"GameObject">
  • "goalScored": -> Send information about who has scored a goal

    • "scoredBy" : String
  • "Ranking": -> Send a list of ranking client Android & Desktop has to show after ending a game

    • "value" : List<"Ranking">
  • "changeBanner": -> Indicates which banner Raspberry Pi has to show

    • "banner" : String

CLIENT CALLS

  • "requestConfiguration": -> Raspberry Pi demand its configuration to show URL server

  • "register": -> Clients Desktop & Android send its register invitation to server

    • "name" : String
    • "type" : String -> "Android" | "Desktop" | "Raspberry"
    • "avatar" : String
  • "clientData": -> Send updates of pads to server

    • "objects" : List<"GameObject">

Clone this wiki locally