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:
- `history`
- `message`
- `attachment`
- `media`
| NO |
-
-## Pin message to channel (public bookmark)
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/message/pin` | HTTP/S | POST | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| id | uint64 | POST | Message ID | N/A | YES |
-
-## Flag message for user (bookmark)
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/message/flag` | HTTP/S | POST | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| id | uint64 | POST | Message ID | N/A | YES |
-
-## 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:
- `history`
- `message`
- `attachment`
- `media`
| NO |
-
-## Pin message to channel (public bookmark)
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/message/pin` | HTTP/S | POST | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| id | uint64 | POST | Message ID | N/A | YES |
-
-## Flag message for user (bookmark)
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/message/flag` | HTTP/S | POST | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| id | uint64 | POST | Message ID | N/A | YES |
-
-
-
-
-# Users
-
-## User login
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/user/login` | HTTP/S | POST | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| username | string | POST | Username or email | N/A | YES |
-| password | string | POST | Password for user | N/A | YES |
-
-## Search users (Directory)
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/user/search` | HTTP/S | GET | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| query | string | GET | Search query to match against users | N/A | NO |
-
-## User login
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/user/login` | HTTP/S | POST | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| username | string | POST | Username or email | N/A | YES |
-| password | string | POST | Password for user | N/A | YES |
-
-## Search users (Directory)
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/user/search` | HTTP/S | GET | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-| query | string | GET | Search query to match against users | N/A | NO |
-
-
-
-
-# Websocket
-
-## Bidirectional websocket chat connection
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/websocket/client` | WebSockets | GET | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
-
-## Bidirectional websocket chat connection
-
-#### Method
-
-| URI | Protocol | Method | Authentication |
-| --- | -------- | ------ | -------------- |
-| `/websocket/client` | WebSockets | GET | Client ID, Session ID |
-
-#### Request parameters
-
-| Parameter | Type | Method | Description | Default | Required? |
-| --------- | ---- | ------ | ----------- | ------- | --------- |
\ No newline at end of file
diff --git a/docs/README.php b/docs/README.php
deleted file mode 100755
index 317c6d938..000000000
--- a/docs/README.php
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/php
- $v) {
- if ($v === "") {
- if ($empty) {
- unset($lines[$k]);
- }
- $empty = true;
- continue;
- }
- $empty = false;
- }
- $contents = implode("\n", $lines);
- $contents = str_replace("`\n|", "` |", $contents);
- $contents = preg_replace("/^# /sm", "\n\n\n# ", $contents);
- return trim($contents);
-}
-
-$spec = json_decode(file_get_contents("src/spec.json"), true);
-
-$apis = array();
-foreach ($spec as $api) {
- $entrypoint = $api['entrypoint'];
- $filename = "src/spec/" . $entrypoint . ".json";
- $filename_md = "src/" . $entrypoint . "/index.md";
- $api = json_decode(file_get_contents($filename), true);
- $api = array_change_key_case_recursive($api);
- if (file_exists($filename_md)) {
- $api['description'] = file_get_contents($filename_md);
- }
- foreach ($api['apis'] as $call) {
- $name = $call['name'];
- $filename_md = "src/" . $entrypoint . "/" . $name . ".md";
- if (file_exists($filename_md)) {
- $call['description'] = file_get_contents($filename_md);
- }
- $api['apis'][$name] = $call;
- }
- $apis[] = $api;
-}
-
-$tpl = new Monotek\MiniTPL\Template;
-$tpl->set_compile_location("/tmp", true);
-$tpl->set_paths("./");
-$tpl->load("README.tpl");
-$tpl->assign("apis", $apis);
-file_put_contents("README.md", cleanUp($tpl->get()));
\ No newline at end of file
diff --git a/docs/README.tpl b/docs/README.tpl
deleted file mode 100644
index 4960f1e1b..000000000
--- a/docs/README.tpl
+++ /dev/null
@@ -1,31 +0,0 @@
-{foreach $apis as $api}
-# {api.title}
-
-{api.description}
-
-{foreach $api.apis as $name => $call}
- ## {call.title}
-
- {call.description}
-
- #### Method
-
- | URI | Protocol | Method | Authentication |
- | --- | -------- | ------ | -------------- |
- | `{api.path}{call.path}` | {if $api.protocol}{api.protocol}{else}HTTP/S{/if} | {call.method} | {eval echo implode(", ", $api.authentication)} |
-
- #### Request parameters
-
- | Parameter | Type | Method | Description | Default | Required? |
- | --------- | ---- | ------ | ----------- | ------- | --------- |
- {foreach $call.parameters as $method => $params}
- {foreach $params as $param}
- | {param.name} | {param.type} | {method|toupper} | {param.title} | {if empty($param.default)}N/A{else}{param.default}{/if}
-{if $param.values}
Values:
{foreach $param.values as $value}- `{value}`
{/foreach}{/if} | {if $param.required}YES{else}NO{/if} |
- {/foreach}
- {/foreach}
-
-
-{/foreach}
-
-{/foreach}
\ No newline at end of file
diff --git a/docs/composer.json b/sam/docs/composer.json
similarity index 100%
rename from docs/composer.json
rename to sam/docs/composer.json
diff --git a/docs/composer.lock b/sam/docs/composer.lock
similarity index 100%
rename from docs/composer.lock
rename to sam/docs/composer.lock
diff --git a/docs/src/message/index.md b/sam/docs/src/message/index.md
similarity index 100%
rename from docs/src/message/index.md
rename to sam/docs/src/message/index.md
diff --git a/docs/src/spec.json b/sam/docs/src/spec.json
similarity index 100%
rename from docs/src/spec.json
rename to sam/docs/src/spec.json
diff --git a/docs/src/spec/channel.json b/sam/docs/src/spec/channel.json
similarity index 100%
rename from docs/src/spec/channel.json
rename to sam/docs/src/spec/channel.json
diff --git a/docs/src/spec/message.json b/sam/docs/src/spec/message.json
similarity index 100%
rename from docs/src/spec/message.json
rename to sam/docs/src/spec/message.json
diff --git a/docs/src/spec/organisation.json b/sam/docs/src/spec/organisation.json
similarity index 100%
rename from docs/src/spec/organisation.json
rename to sam/docs/src/spec/organisation.json
diff --git a/docs/src/spec/team.json b/sam/docs/src/spec/team.json
similarity index 100%
rename from docs/src/spec/team.json
rename to sam/docs/src/spec/team.json
diff --git a/docs/src/spec/user.json b/sam/docs/src/spec/user.json
similarity index 100%
rename from docs/src/spec/user.json
rename to sam/docs/src/spec/user.json
diff --git a/docs/src/spec/websocket.json b/sam/docs/src/spec/websocket.json
similarity index 100%
rename from docs/src/spec/websocket.json
rename to sam/docs/src/spec/websocket.json
diff --git a/docs/src/websocket/websocket.md b/sam/docs/src/websocket/websocket.md
similarity index 100%
rename from docs/src/websocket/websocket.md
rename to sam/docs/src/websocket/websocket.md
diff --git a/docs/vendor/autoload.php b/sam/docs/vendor/autoload.php
similarity index 100%
rename from docs/vendor/autoload.php
rename to sam/docs/vendor/autoload.php
diff --git a/docs/vendor/composer/ClassLoader.php b/sam/docs/vendor/composer/ClassLoader.php
similarity index 100%
rename from docs/vendor/composer/ClassLoader.php
rename to sam/docs/vendor/composer/ClassLoader.php
diff --git a/docs/vendor/composer/LICENSE b/sam/docs/vendor/composer/LICENSE
similarity index 100%
rename from docs/vendor/composer/LICENSE
rename to sam/docs/vendor/composer/LICENSE
diff --git a/docs/vendor/composer/autoload_classmap.php b/sam/docs/vendor/composer/autoload_classmap.php
similarity index 100%
rename from docs/vendor/composer/autoload_classmap.php
rename to sam/docs/vendor/composer/autoload_classmap.php
diff --git a/docs/vendor/composer/autoload_namespaces.php b/sam/docs/vendor/composer/autoload_namespaces.php
similarity index 100%
rename from docs/vendor/composer/autoload_namespaces.php
rename to sam/docs/vendor/composer/autoload_namespaces.php
diff --git a/docs/vendor/composer/autoload_psr4.php b/sam/docs/vendor/composer/autoload_psr4.php
similarity index 100%
rename from docs/vendor/composer/autoload_psr4.php
rename to sam/docs/vendor/composer/autoload_psr4.php
diff --git a/docs/vendor/composer/autoload_real.php b/sam/docs/vendor/composer/autoload_real.php
similarity index 100%
rename from docs/vendor/composer/autoload_real.php
rename to sam/docs/vendor/composer/autoload_real.php
diff --git a/docs/vendor/composer/autoload_static.php b/sam/docs/vendor/composer/autoload_static.php
similarity index 100%
rename from docs/vendor/composer/autoload_static.php
rename to sam/docs/vendor/composer/autoload_static.php
diff --git a/docs/vendor/composer/installed.json b/sam/docs/vendor/composer/installed.json
similarity index 100%
rename from docs/vendor/composer/installed.json
rename to sam/docs/vendor/composer/installed.json
diff --git a/docs/vendor/monotek/minitpl/.gitignore b/sam/docs/vendor/monotek/minitpl/.gitignore
similarity index 100%
rename from docs/vendor/monotek/minitpl/.gitignore
rename to sam/docs/vendor/monotek/minitpl/.gitignore
diff --git a/docs/vendor/monotek/minitpl/.gitmodules b/sam/docs/vendor/monotek/minitpl/.gitmodules
similarity index 100%
rename from docs/vendor/monotek/minitpl/.gitmodules
rename to sam/docs/vendor/monotek/minitpl/.gitmodules
diff --git a/docs/vendor/monotek/minitpl/README.markdown b/sam/docs/vendor/monotek/minitpl/README.markdown
similarity index 100%
rename from docs/vendor/monotek/minitpl/README.markdown
rename to sam/docs/vendor/monotek/minitpl/README.markdown
diff --git a/docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Compiler.php b/sam/docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Compiler.php
similarity index 100%
rename from docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Compiler.php
rename to sam/docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Compiler.php
diff --git a/docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Template.php b/sam/docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Template.php
similarity index 100%
rename from docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Template.php
rename to sam/docs/vendor/monotek/minitpl/code/Monotek/MiniTPL/Template.php
diff --git a/docs/vendor/monotek/minitpl/composer.json b/sam/docs/vendor/monotek/minitpl/composer.json
similarity index 100%
rename from docs/vendor/monotek/minitpl/composer.json
rename to sam/docs/vendor/monotek/minitpl/composer.json
diff --git a/docs/vendor/monotek/minitpl/documentation/documentation_en.markdown b/sam/docs/vendor/monotek/minitpl/documentation/documentation_en.markdown
similarity index 100%
rename from docs/vendor/monotek/minitpl/documentation/documentation_en.markdown
rename to sam/docs/vendor/monotek/minitpl/documentation/documentation_en.markdown
diff --git a/docs/vendor/monotek/minitpl/documentation/documentation_sl.markdown b/sam/docs/vendor/monotek/minitpl/documentation/documentation_sl.markdown
similarity index 100%
rename from docs/vendor/monotek/minitpl/documentation/documentation_sl.markdown
rename to sam/docs/vendor/monotek/minitpl/documentation/documentation_sl.markdown
diff --git a/docs/vendor/monotek/minitpl/phpunit.xml b/sam/docs/vendor/monotek/minitpl/phpunit.xml
similarity index 100%
rename from docs/vendor/monotek/minitpl/phpunit.xml
rename to sam/docs/vendor/monotek/minitpl/phpunit.xml
diff --git a/docs/vendor/monotek/minitpl/test/.gitignore b/sam/docs/vendor/monotek/minitpl/test/.gitignore
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/.gitignore
rename to sam/docs/vendor/monotek/minitpl/test/.gitignore
diff --git a/docs/vendor/monotek/minitpl/test/TemplateTest.php b/sam/docs/vendor/monotek/minitpl/test/TemplateTest.php
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/TemplateTest.php
rename to sam/docs/vendor/monotek/minitpl/test/TemplateTest.php
diff --git a/docs/vendor/monotek/minitpl/test/bootstrap.php b/sam/docs/vendor/monotek/minitpl/test/bootstrap.php
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/bootstrap.php
rename to sam/docs/vendor/monotek/minitpl/test/bootstrap.php
diff --git a/docs/vendor/monotek/minitpl/test/compiled/01_variable.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/01_variable.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/01_variable.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/01_variable.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/02_arrays.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/02_arrays.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/02_arrays.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/02_arrays.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/03_modifiers.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/03_modifiers.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/03_modifiers.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/03_modifiers.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/04_objects.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/04_objects.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/04_objects.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/04_objects.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/05_constants.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/05_constants.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/05_constants.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/05_constants.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/06_includes.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/06_includes.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/06_includes.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/06_includes.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/07_eval.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/07_eval.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/07_eval.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/07_eval.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/08_utf8_bom.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/08_utf8_bom.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/08_utf8_bom.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/08_utf8_bom.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/09_blocks_and_includes.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/09_blocks_and_includes.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/09_blocks_and_includes.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/09_blocks_and_includes.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/10_literal_blocks.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/10_literal_blocks.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/10_literal_blocks.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/10_literal_blocks.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/11_expressions.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/11_expressions.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/11_expressions.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/11_expressions.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/12_global_objects.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/12_global_objects.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/12_global_objects.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/12_global_objects.tpl
diff --git a/docs/vendor/monotek/minitpl/test/compiled/13_foreach_array.tpl b/sam/docs/vendor/monotek/minitpl/test/compiled/13_foreach_array.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/compiled/13_foreach_array.tpl
rename to sam/docs/vendor/monotek/minitpl/test/compiled/13_foreach_array.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/01_variable.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/01_variable.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/01_variable.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/01_variable.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/02_arrays.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/02_arrays.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/02_arrays.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/02_arrays.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/03_modifiers.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/03_modifiers.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/03_modifiers.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/03_modifiers.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/04_objects.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/04_objects.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/04_objects.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/04_objects.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/05_constants.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/05_constants.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/05_constants.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/05_constants.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/06_includes.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/06_includes.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/06_includes.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/06_includes.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/07_eval.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/07_eval.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/07_eval.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/07_eval.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/08_utf8_bom.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/08_utf8_bom.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/08_utf8_bom.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/08_utf8_bom.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/09_blocks_and_includes.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/09_blocks_and_includes.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/09_blocks_and_includes.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/09_blocks_and_includes.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/10_literal_blocks.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/10_literal_blocks.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/10_literal_blocks.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/10_literal_blocks.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/11_expressions.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/11_expressions.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/11_expressions.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/11_expressions.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/12_global_objects.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/12_global_objects.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/12_global_objects.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/12_global_objects.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates/13_foreach_array.tpl b/sam/docs/vendor/monotek/minitpl/test/templates/13_foreach_array.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates/13_foreach_array.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates/13_foreach_array.tpl
diff --git a/docs/vendor/monotek/minitpl/test/templates2/fail_to_compile.tpl b/sam/docs/vendor/monotek/minitpl/test/templates2/fail_to_compile.tpl
similarity index 100%
rename from docs/vendor/monotek/minitpl/test/templates2/fail_to_compile.tpl
rename to sam/docs/vendor/monotek/minitpl/test/templates2/fail_to_compile.tpl