mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
Added getChatHistory and getChatHead (api+code+doc)
This commit is contained in:
parent
cf1bba8e65
commit
cb2b93b133
3 changed files with 155 additions and 0 deletions
|
@ -292,6 +292,34 @@ returns the text of a pad formatted as HTML
|
|||
* `{code: 0, message:"ok", data: {html:"Welcome Text<br>More Text"}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
### Chat
|
||||
#### getChatHistory(padID, [start, end])
|
||||
* API >= 1.2.7
|
||||
|
||||
returns
|
||||
|
||||
* a part of the chat history, when `start` and `end` are given
|
||||
* the whole chat histroy, when no extra parameters are given
|
||||
|
||||
|
||||
*Example returns:*
|
||||
|
||||
* `{"code":0,"message":"ok","data":{"messages":[{"text":"foo","userId":"a.foo","time":1359199533759,"userName":"test"},{"text":"bar","userId":"a.foo","time":1359199534622,"userName":"test"}]}}`
|
||||
* `{code: 1, message:"start is higher or equal to the current chatHead", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getChatHead(padID)
|
||||
* API >= 1.2.7
|
||||
|
||||
returns the chatHead (last number of the last chat-message) of the pad
|
||||
|
||||
|
||||
*Example returns:*
|
||||
|
||||
* `{code: 0, message:"ok", data: {chatHead: 42}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
|
||||
### Pad
|
||||
Group pads are normal pads, but with the name schema GROUPID$PADNAME. A security manager controls access of them and its forbidden for normal pads to include a $ in the name.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue