update generator to print request parameters
This commit is contained in:
parent
cb3b2dcb57
commit
5f6ae7a4df
187
docs/README.md
187
docs/README.md
@ -4,52 +4,159 @@ Organisations represent a top-level grouping entity. There may be many organisat
|
||||
|
||||
## Add new organisation
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Archive organisation
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
| id | uint64 | POST | ID of Organisation | N/A | NO |
|
||||
|
||||
## Update organisation details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
| id | uint64 | POST | ID of Organisation | N/A | NO |
|
||||
| name | string | POST | Name of Organisation | N/A | YES |
|
||||
|
||||
## Read organisation details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
| id | uint64 | GET | ID of Organisation | N/A | NO |
|
||||
|
||||
## Remove organisation
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
| id | uint64 | GET | ID of Organisation | N/A | NO |
|
||||
|
||||
## Search organisations
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
| query | string | GET | Search query | N/A | NO |
|
||||
|
||||
# Teams
|
||||
|
||||
An organisation may have many teams. Teams may have many channels available. Access to channels may be shared between teams.
|
||||
|
||||
## Add new team
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Archive team
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Update team details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Move team to different organisation
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Read team details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Remove team
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Search teams
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
# 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).
|
||||
|
||||
## Add new channel
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
| name | type | POST | title | N/A | NO |
|
||||
|
||||
## Archive channel
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Update channel details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Move channel to different team or organisation
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Read channel details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Remove channel
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Search channels
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
# Messages
|
||||
|
||||
Messages represent individual messages in the chat system. Messages are typed, indicating the event which triggered the message.
|
||||
@ -74,38 +181,118 @@ The following event types may be sent with a message event:
|
||||
|
||||
## Add new message
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Update message details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Flag message for user (bookmark)
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Pin message to channel (public bookmark)
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Read message details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Remove message
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Search messages
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
# Members
|
||||
|
||||
## Add new member
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Update member details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Read member details
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Remove member
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Search members (Directory)
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
# Files
|
||||
|
||||
The Files API is an abstraction over messages that have been sent with a file attachment.
|
||||
|
||||
## Add new file
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Read file
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Remove file
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
## Search files
|
||||
|
||||
### Request parameters
|
||||
|
||||
| Parameter | Type | Method | Description | Default | Required? |
|
||||
| --------- | ---- | ------ | ----------- | ------- | --------- |
|
||||
|
||||
@ -7,6 +7,18 @@
|
||||
## {call.title}
|
||||
|
||||
{call.description}
|
||||
|
||||
### 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.required}YES{else}NO{/if} |
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
|
||||
|
||||
{/foreach}
|
||||
|
||||
{/foreach}
|
||||
Loading…
x
Reference in New Issue
Block a user