diff options
Diffstat (limited to 'docs/api/channels-messages.md')
| -rw-r--r-- | docs/api/channels-messages.md | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/docs/api/channels-messages.md b/docs/api/channels-messages.md index 1eca1b4..e762600 100644 --- a/docs/api/channels-messages.md +++ b/docs/api/channels-messages.md @@ -29,6 +29,7 @@ Every channel has a unique name, chosen when the channel is created. ## Names <!-- This prose is duplicated in authentication.md. If you change it here, consider changing it there, too. --> + The service handles channel names using two separate forms. The first form is as given in the request used to create the channel. This form of the channel name is used throughout the API, and the service will preserve the name as entered (other than applying normalization), so that users' preferences around capitalization and accent marks are preserved. @@ -58,16 +59,16 @@ Creates a channel. The request must have the following fields: | Field | Type | Description | -|:-------|:-------|:--------------------| +| :----- | :----- | :------------------ | | `name` | string | The channel's name. | The proposed `name` must be valid. The precise definition of valid is still up in the air, but, at minimum: -* It must be non-empty. -* It must not be "too long." (Currently, 64 characters is too long.) -* It must begin with a printing character. -* It must end with a printing character. -* It must not contain runs of multiple whitespace characters. +- It must be non-empty. +- It must not be "too long." (Currently, 64 characters is too long.) +- It must begin with a printing character. +- It must end with a printing character. +- It must not contain runs of multiple whitespace characters. ### Success @@ -84,7 +85,7 @@ This endpoint will respond with a status of The response will have the following fields: | Field | Type | Description | -|:-------|:-------|:----------------------------------------------------------------------------------------------------------------------------------------| +| :----- | :----- | :-------------------------------------------------------------------------------------------------------------------------------------- | | `id` | string | A unique identifier for the channel. This can be used to associate the channel with events, or to make API calls targeting the channel. | | `name` | string | The channel's name. | @@ -107,7 +108,7 @@ Sends a message to a channel. This endpoint requires the following path parameter: | Parameter | Type | Description | -|:----------|:-------|:--------------| +| :-------- | :----- | :------------ | | `id` | string | A channel ID. | ### Request @@ -121,7 +122,7 @@ This endpoint requires the following path parameter: The request must have the following fields: | Field | Type | Description | -|:-------|:-------|:---------------------------------------| +| :----- | :----- | :------------------------------------- | | `body` | string | The message to deliver to the channel. | ### Success @@ -142,7 +143,7 @@ This endpoint will respond with a status of The response will have the following fields: | Field | Type | Description | -|:----------|:----------|:----------------------------------------------------------------------------------------------------------------------------------------| +| :-------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------------- | | `at` | timestamp | The moment the message was sent. | | `channel` | string | The ID of the channel the message was sent to. | | `sender` | string | The ID of the user that sent the message. | @@ -166,7 +167,7 @@ Deleting a channel prevents it from receiving any further messages. The channel This endpoint requires the following path parameter: | Parameter | Type | Description | -|:----------|:-------|:--------------| +| :-------- | :----- | :------------ | | `id` | string | A channel ID. | ### Success @@ -183,7 +184,7 @@ This endpoint will respond with a status of The response will have the following fields: | Field | Type | Description | -|:------|:-------|:------------------| +| :---- | :----- | :---------------- | | `id` | string | The channel's ID. | When completed, the service will emit a [message deleted](events.md#message-deleted) event for each message in the channel, followed by a [channel deleted](events.md#channel-deleted) event with the channel's ID. @@ -203,7 +204,7 @@ Deletes a message. This endpoint requires the following path parameter: | Parameter | Type | Description | -|:----------|:-------|:--------------| +| :-------- | :----- | :------------ | | `id` | string | A message ID. | ### Success @@ -220,7 +221,7 @@ This endpoint will respond with a status of The response will have the following fields: | Field | Type | Description | -|:------|:-------|:------------------| +| :---- | :----- | :---------------- | | `id` | string | The message's ID. | When completed, the service will emit a [message deleted](events.md#message-deleted) event with the message's ID. |
