mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-11 09:41:30 -04:00
remove trailing whitespace
This commit is contained in:
parent
e1edc8079f
commit
0b6709392b
104 changed files with 1479 additions and 1479 deletions
|
@ -3,7 +3,7 @@
|
|||
## What can I do with this API?
|
||||
The API gives another web application control of the pads. The basic functions are
|
||||
|
||||
* create/delete pads
|
||||
* create/delete pads
|
||||
* grant/forbid access to pads
|
||||
* get/set pad content
|
||||
|
||||
|
@ -15,30 +15,30 @@ Take a look at [HTTP API client libraries](https://github.com/Pita/etherpad-lite
|
|||
|
||||
### Example 1
|
||||
|
||||
A portal (such as WordPress) wants to give a user access to a new pad. Let's assume the user have the internal id 7 and his name is michael.
|
||||
A portal (such as WordPress) wants to give a user access to a new pad. Let's assume the user have the internal id 7 and his name is michael.
|
||||
|
||||
Portal maps the internal userid to an etherpad author.
|
||||
Portal maps the internal userid to an etherpad author.
|
||||
|
||||
> Request: `http://pad.domain/api/1/createAuthorIfNotExistsFor?apikey=secret&name=Michael&authorMapper=7`
|
||||
>
|
||||
>
|
||||
> Response: `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
|
||||
|
||||
Portal maps the internal userid to an etherpad group:
|
||||
|
||||
> Request: `http://pad.domain/api/1/createGroupIfNotExistsFor?apikey=secret&groupMapper=7`
|
||||
>
|
||||
>
|
||||
> Response: `{code: 0, message:"ok", data: {groupID: "g.s8oes9dhwrvt0zif"}}`
|
||||
|
||||
Portal creates a pad in the userGroup
|
||||
|
||||
> Request: `http://pad.domain/api/1/createGroupPad?apikey=secret&groupID=g.s8oes9dhwrvt0zif&padName=samplePad&text=This is the first sentence in the pad`
|
||||
>
|
||||
>
|
||||
> Response: `{code: 0, message:"ok", data: null}`
|
||||
|
||||
Portal starts the session for the user on the group:
|
||||
|
||||
> Request: `http://pad.domain/api/1/createSession?apikey=secret&groupID=g.s8oes9dhwrvt0zif&authorID=a.s8oes9dhwrvt0zif&validUntil=1312201246`
|
||||
>
|
||||
>
|
||||
> Response: `{"data":{"sessionID": "s.s8oes9dhwrvt0zif"}}`
|
||||
|
||||
Portal places the cookie "sessionID" with the given value on the client and creates an iframe including the pad.
|
||||
|
@ -50,7 +50,7 @@ A portal (such as WordPress) wants to transform the contents of a pad that multi
|
|||
Portal retrieves the contents of the pad for entry into the db as a blog post:
|
||||
|
||||
> Request: `http://pad.domain/api/1/getText?apikey=secret&padID=g.s8oes9dhwrvt0zif$123`
|
||||
>
|
||||
>
|
||||
> Response: `{code: 0, message:"ok", data: {text:"Welcome Text"}}`
|
||||
|
||||
Portal submits content into new blog post
|
||||
|
@ -98,7 +98,7 @@ Responses are valid JSON in the following format:
|
|||
|
||||
### Authentication
|
||||
|
||||
Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad-Lite deployment. This token will be random string, generated by Etherpad-Lite at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad Lite. Only Etherpad Lite and the requesting application knows this key. Token management will not be exposed through this API.
|
||||
Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad-Lite deployment. This token will be random string, generated by Etherpad-Lite at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad Lite. Only Etherpad Lite and the requesting application knows this key. Token management will not be exposed through this API.
|
||||
|
||||
### Node Interoperability
|
||||
|
||||
|
@ -118,7 +118,7 @@ Pads can belong to a group. The padID of grouppads is starting with a groupID li
|
|||
|
||||
#### createGroup()
|
||||
* API >= 1
|
||||
|
||||
|
||||
creates a new group
|
||||
|
||||
*Example returns:*
|
||||
|
@ -127,7 +127,7 @@ creates a new group
|
|||
#### createGroupIfNotExistsFor(groupMapper)
|
||||
* API >= 1
|
||||
|
||||
this functions helps you to map your application group ids to etherpad lite group ids
|
||||
this functions helps you to map your application group ids to etherpad lite group ids
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
|
||||
|
@ -170,7 +170,7 @@ lists all existing groups
|
|||
* `{code: 0, message:"ok", data: {groupIDs: []}}`
|
||||
|
||||
### Author
|
||||
These authors are bound to the attributes the users choose (color and name).
|
||||
These authors are bound to the attributes the users choose (color and name).
|
||||
|
||||
#### createAuthor([name])
|
||||
* API >= 1
|
||||
|
@ -183,7 +183,7 @@ creates a new author
|
|||
#### createAuthorIfNotExistsFor(authorMapper [, name])
|
||||
* API >= 1
|
||||
|
||||
this functions helps you to map your application author ids to etherpad lite author ids
|
||||
this functions helps you to map your application author ids to etherpad lite author ids
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
|
||||
|
@ -290,7 +290,7 @@ returns the text of a pad formatted as HTML
|
|||
* `{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.
|
||||
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.
|
||||
|
||||
#### createPad(padID [, text])
|
||||
* API >= 1
|
||||
|
@ -398,7 +398,7 @@ returns the timestamp of the last revision of the pad
|
|||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {lastEdited: 1340815946602}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
|
||||
#### sendClientsMessage(padID, msg)
|
||||
* API >= 1.1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue