From 170e2225735abc270d2b72da8028bbee46e03784 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Wed, 16 Dec 2020 16:17:11 -0700 Subject: [PATCH] Add docs for the SendCard event --- server/events.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/server/events.md b/server/events.md index aa17758..401ba0b 100644 --- a/server/events.md +++ b/server/events.md @@ -104,8 +104,25 @@ This event is sent to and from the server when a spirit is typing into one of th

--- -## Description: +# `SendCard`: +## Description: +Sends a card to the server, the server either then either forwards the card to the spirit or the past questions pile. The action that is taken is dependant on what the `from` property is set to. + +## Request Payload: +| Property | Type | Description +| -------- | ---- | ----------- +| text | String | The text of the card that is being sent. +| from | String | The source of where the card is being sent from. This can be one of `"writer"`, `"guesser"`, any other value will return an error. +| team | Integer | The team that is sending the card. This can be either `1` or `2`, any other value will return an error. + +## Response Payload: (`NewCard`) +| Property | Type | Description +| -------- | ---- | ----------- +| text | String | The text of the card that was sent. +| from | String | The source of the card. This will be one of `"deck"`, or `"guesser"` + +

## Request Payload: | Property | Type | Description