In order to simplify sending and receiving data, the Tick Talk protocol, as of v6.0.0, is built on top of Requests.
Requests features two different independent fields that are utilized in Tick Talk: name and data.
A name is analagous to a function/method name in programming and data is analagous to a list of parameters or return values. The following section describes what names are valid and what data is valid along with them.
- Purpose: To show a server message (can only be sent by a server)
- Parameter: The server message, as a string, to display
- Note(s): Server messages can be displayed as alert/dialogue boxes or something similar
- Purpose: Sent from a client to login a user
- Parameter: A
LoginObject - Return: The signed in user's
UserData - Error: The error encountered as a string
- Purpose: A request to get the
UserDataobject of a user - Parameter: The username of a user
- Return: The
UserDataobject of the requested user, with blank strings populating the private fields - Error: The error encountered (typically user not found) as a string
- Purpose: To give a client an updated
UserDataobject when something happens externally, like if they are removed from a group - Parameter: A
UserDataobject
- Purpose: To set the logged-in user's picture
- Parameter: The base-64 representation of the contents of a PNG file
- Return: The updated
UserDataobject of the signed in user - Error: The error encountered as a string
- Purpose: To set the logged-in user's display name
- Parameter: The new display name
- Return: The updated
UserDataobject of the signed in user - Error: The error encountered as a string
- Purpose: To send a message to a room
- Parameter: A
RoomMessageobject with all fields except for theidandtimestampfields populated - Notes: Room messages are unencrypted
- Purpose: To tell a client there is a
RoomMessagethat a client doesn't have (either because the message is new or because it was requested by the client) - Parameter: The
RoomMessageobject - Notes: THIS IS ONLY FROM A SERVER TO A CLIENT
- Purpose: To get a block (a set) of ~1000 room messages from the server, for when a user exhausts the client's cache (if there is any at all)
- Parameter: A
MessageBlockRequestobject
- Purpose: To create a new group chat
- Parameter: A
MakeGroupobject - Return: An updated
UserDataobject - Error: The error encountered as a string
- Purpose: To change some data about a group, like its description or picture
- Parameter: A
ChangeGroupInfoobject - Return: An updated
UserDataobject - Error: The error encountered as a string
- Purpose: To add, remove, or change the nickname of a user in a group
- Parameter: A
ChangeGroupUserobject - Return: An updated
UserDataobject - Error: The error encountered as a string
- Purpose: To send a message to a group
- Parameter: A
GroupMessageobject with all fields except for theidandtimestampfields populated - Notes: Group messages are encrypted
- Purpose: To tell a client there is a
GroupMessagethat a client doesn't have (either because the message is new or because it was requested by the client) - Parameter: The
GroupMessageobject - Notes: THIS IS ONLY FROM A SERVER TO A CLIENT
- Purpose: To get a block (a set) of ~1000 group messages from the server, for when a user exhausts the client's cache (if there is any at all)
- Parameter: A
MessageBlockRequestobject