From f67657f72d8af56808ecd6e725e4c0a1937bee8f Mon Sep 17 00:00:00 2001 From: Tit Petric Date: Sun, 1 Jul 2018 00:10:08 +0200 Subject: [PATCH] move sam docs --- docs/.gitignore | 1 - docs/README.md | 854 ------------------ docs/README.php | 64 -- docs/README.tpl | 31 - {docs => sam/docs}/composer.json | 0 {docs => sam/docs}/composer.lock | 0 {docs => sam/docs}/src/message/index.md | 0 {docs => sam/docs}/src/spec.json | 0 {docs => sam/docs}/src/spec/channel.json | 0 {docs => sam/docs}/src/spec/message.json | 0 {docs => sam/docs}/src/spec/organisation.json | 0 {docs => sam/docs}/src/spec/team.json | 0 {docs => sam/docs}/src/spec/user.json | 0 {docs => sam/docs}/src/spec/websocket.json | 0 {docs => sam/docs}/src/websocket/websocket.md | 0 {docs => sam/docs}/vendor/autoload.php | 0 .../docs}/vendor/composer/ClassLoader.php | 0 {docs => sam/docs}/vendor/composer/LICENSE | 0 .../vendor/composer/autoload_classmap.php | 0 .../vendor/composer/autoload_namespaces.php | 0 .../docs}/vendor/composer/autoload_psr4.php | 0 .../docs}/vendor/composer/autoload_real.php | 0 .../docs}/vendor/composer/autoload_static.php | 0 .../docs}/vendor/composer/installed.json | 0 .../docs}/vendor/monotek/minitpl/.gitignore | 0 .../docs}/vendor/monotek/minitpl/.gitmodules | 0 .../vendor/monotek/minitpl/README.markdown | 0 .../minitpl/code/Monotek/MiniTPL/Compiler.php | 0 .../minitpl/code/Monotek/MiniTPL/Template.php | 0 .../vendor/monotek/minitpl/composer.json | 0 .../documentation/documentation_en.markdown | 0 .../documentation/documentation_sl.markdown | 0 .../docs}/vendor/monotek/minitpl/phpunit.xml | 0 .../vendor/monotek/minitpl/test/.gitignore | 0 .../monotek/minitpl/test/TemplateTest.php | 0 .../vendor/monotek/minitpl/test/bootstrap.php | 0 .../minitpl/test/compiled/01_variable.tpl | 0 .../minitpl/test/compiled/02_arrays.tpl | 0 .../minitpl/test/compiled/03_modifiers.tpl | 0 .../minitpl/test/compiled/04_objects.tpl | 0 .../minitpl/test/compiled/05_constants.tpl | 0 .../minitpl/test/compiled/06_includes.tpl | 0 .../monotek/minitpl/test/compiled/07_eval.tpl | 0 .../minitpl/test/compiled/08_utf8_bom.tpl | 0 .../test/compiled/09_blocks_and_includes.tpl | 0 .../test/compiled/10_literal_blocks.tpl | 0 .../minitpl/test/compiled/11_expressions.tpl | 0 .../test/compiled/12_global_objects.tpl | 0 .../test/compiled/13_foreach_array.tpl | 0 .../minitpl/test/templates/01_variable.tpl | 0 .../minitpl/test/templates/02_arrays.tpl | 0 .../minitpl/test/templates/03_modifiers.tpl | 0 .../minitpl/test/templates/04_objects.tpl | 0 .../minitpl/test/templates/05_constants.tpl | 0 .../minitpl/test/templates/06_includes.tpl | 0 .../minitpl/test/templates/07_eval.tpl | 0 .../minitpl/test/templates/08_utf8_bom.tpl | 0 .../test/templates/09_blocks_and_includes.tpl | 0 .../test/templates/10_literal_blocks.tpl | 0 .../minitpl/test/templates/11_expressions.tpl | 0 .../test/templates/12_global_objects.tpl | 0 .../test/templates/13_foreach_array.tpl | 0 .../test/templates2/fail_to_compile.tpl | 0 63 files changed, 950 deletions(-) delete mode 100644 docs/.gitignore delete mode 100644 docs/README.md delete mode 100755 docs/README.php delete mode 100644 docs/README.tpl rename {docs => sam/docs}/composer.json (100%) rename {docs => sam/docs}/composer.lock (100%) rename {docs => sam/docs}/src/message/index.md (100%) rename {docs => sam/docs}/src/spec.json (100%) rename {docs => sam/docs}/src/spec/channel.json (100%) rename {docs => sam/docs}/src/spec/message.json (100%) rename {docs => sam/docs}/src/spec/organisation.json (100%) rename {docs => sam/docs}/src/spec/team.json (100%) rename {docs => sam/docs}/src/spec/user.json (100%) rename {docs => sam/docs}/src/spec/websocket.json (100%) rename {docs => sam/docs}/src/websocket/websocket.md (100%) rename {docs => sam/docs}/vendor/autoload.php (100%) rename {docs => sam/docs}/vendor/composer/ClassLoader.php (100%) rename {docs => sam/docs}/vendor/composer/LICENSE (100%) rename {docs => sam/docs}/vendor/composer/autoload_classmap.php (100%) rename {docs => sam/docs}/vendor/composer/autoload_namespaces.php (100%) rename {docs => sam/docs}/vendor/composer/autoload_psr4.php (100%) rename {docs => sam/docs}/vendor/composer/autoload_real.php (100%) rename {docs => sam/docs}/vendor/composer/autoload_static.php (100%) rename {docs => sam/docs}/vendor/composer/installed.json (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/.gitignore (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/.gitmodules (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/README.markdown (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/code/Monotek/MiniTPL/Compiler.php (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/code/Monotek/MiniTPL/Template.php (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/composer.json (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/documentation/documentation_en.markdown (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/documentation/documentation_sl.markdown (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/phpunit.xml (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/.gitignore (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/TemplateTest.php (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/bootstrap.php (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/01_variable.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/02_arrays.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/03_modifiers.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/04_objects.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/05_constants.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/06_includes.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/07_eval.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/08_utf8_bom.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/09_blocks_and_includes.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/10_literal_blocks.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/11_expressions.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/12_global_objects.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/compiled/13_foreach_array.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/01_variable.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/02_arrays.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/03_modifiers.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/04_objects.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/05_constants.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/06_includes.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/07_eval.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/08_utf8_bom.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/09_blocks_and_includes.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/10_literal_blocks.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/11_expressions.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/12_global_objects.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates/13_foreach_array.tpl (100%) rename {docs => sam/docs}/vendor/monotek/minitpl/test/templates2/fail_to_compile.tpl (100%) diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index b49a22ad0..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/cache \ No newline at end of file diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 2095d7327..000000000 --- a/docs/README.md +++ /dev/null @@ -1,854 +0,0 @@ -# Organisations - -Organisations represent a top-level grouping entity. There may be many organisations defined in a single deployment. - -## Update organisation details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | NO | -| name | string | POST | Organisation Name | N/A | YES | - -## Remove organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Read organisation details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Search organisations - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search query | N/A | NO | - -## Archive organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/archive` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | YES | - -## Update organisation details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | NO | -| name | string | POST | Organisation Name | N/A | YES | - -## Remove organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Read organisation details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Search organisations - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search query | N/A | NO | - -## Archive organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/organisation/archive` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | YES | - - - - -# Teams - -An organisation may have many teams. Teams may have many channels available. Access to channels may be shared between teams. - -## Update team details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Team ID | N/A | NO | -| name | string | POST | Name of Team | N/A | YES | -| members | []uint64 | POST | Team member IDs | N/A | NO | - -## Remove team - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Read team details and memberships - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Search teams - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search query | N/A | NO | - -## Archive team - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/archive` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | YES | - -## Move team to different organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/move` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | YES | -| organisation_id | uint64 | POST | Organisation ID | N/A | YES | - -## Update team details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Team ID | N/A | NO | -| name | string | POST | Name of Team | N/A | YES | -| members | []uint64 | POST | Team member IDs | N/A | NO | - -## Remove team - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Read team details and memberships - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Organisation ID | N/A | YES | - -## Search teams - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search query | N/A | NO | - -## Archive team - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/archive` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | YES | - -## Move team to different organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/team/move` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Organisation ID | N/A | YES | -| organisation_id | uint64 | POST | Organisation ID | N/A | YES | - - - - -# Channels - -A channel is a representation of a sequence of messages. It has meta data like channel subject. Channels may be public, private or direct (between two users). - -## Update channel details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Channel ID | N/A | NO | -| name | string | POST | Name of Channel | N/A | YES | -| topic | string | POST | Subject of Channel | N/A | YES | - -## Remove channel - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Channel ID | N/A | YES | - -## Read channel details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Channel ID | N/A | YES | - -## Search channels - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search query | N/A | NO | - -## Archive channel - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/archive` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Channel ID | N/A | YES | - -## Move channel to different team or organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/move` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Channel ID | N/A | YES | - -## Merge one team into another - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/merge` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| destination | uint64 | POST | Destination Channel ID | N/A | YES | -| source | uint64 | POST | Source Channel ID | N/A | YES | - -## Update channel details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Channel ID | N/A | NO | -| name | string | POST | Name of Channel | N/A | YES | -| topic | string | POST | Subject of Channel | N/A | YES | - -## Remove channel - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Channel ID | N/A | YES | - -## Read channel details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Channel ID | N/A | YES | - -## Search channels - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search query | N/A | NO | - -## Archive channel - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/archive` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Channel ID | N/A | YES | - -## Move channel to different team or organisation - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/move` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Channel ID | N/A | YES | - -## Merge one team into another - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/channel/merge` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| destination | uint64 | POST | Destination Channel ID | N/A | YES | -| source | uint64 | POST | Source Channel ID | N/A | YES | - - - - -# Messages - -Messages represent individual messages in the chat system. Messages are typed, indicating the event which triggered the message. - -Currently expected message types are: - -| Name | Description | -| ---- | ----------- | -| CREATE | The first message when the channel is created | -| TOPIC | A member changed the topic of the channel | -| RENAME | A member renamed the channel | -| MESSAGE | A member posted a message to the channel | -| FILE | A member uploaded a file to the channel | - -The following event types may be sent with a message event: - -| Name | Description | -| ---- | ----------- | -| CREATED | A message has been created on a channel | -| EDITED | A message has been edited by the sender | -| REMOVED | A message has been removed by the sender | - -## New message / edit message - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/message/edit` | HTTP/S | POST | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | POST | Message ID | N/A | NO | -| channel_id | uint64 | POST | Channel ID where to post message | N/A | NO | -| contents | string | POST | Message contents (markdown) | N/A | YES | - -## Attach file to message - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/message/attach` | HTTP/S | PUT | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | - -## Remove message - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/message/remove` | HTTP/S | DELETE | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| id | uint64 | GET | Message ID | N/A | YES | - -## Read message details - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/message/read` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| channel_id | uint64 | POST | Channel ID to read messages from | N/A | YES | - -## Search messages - -#### Method - -| URI | Protocol | Method | Authentication | -| --- | -------- | ------ | -------------- | -| `/message/search` | HTTP/S | GET | Client ID, Session ID | - -#### Request parameters - -| Parameter | Type | Method | Description | Default | Required? | -| --------- | ---- | ------ | ----------- | ------- | --------- | -| query | string | GET | Search string to match against messages | N/A | NO | -| message_type | string | GET | Limit results to message type | N/A

Values: