diff options
author | Marcel Klehr <mklehr@gmx.net> | 2012-12-27 22:09:22 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2012-12-27 22:09:22 +0100 |
commit | ffc9bcf028e4af5bceb3b3e9123d305d02b193f4 (patch) | |
tree | e7bbd0d037cb2833638da72f5de3d7f62bc57a88 | |
parent | b681359dfaebffb2e0c497858e56446e37c07109 (diff) | |
download | etherpad-lite-ffc9bcf028e4af5bceb3b3e9123d305d02b193f4.zip |
Bump API version for checkToken endpoint
-rw-r--r-- | doc/api/http_api.md | 7 | ||||
-rw-r--r-- | src/node/handler/APIHandler.js | 35 |
2 files changed, 39 insertions, 3 deletions
diff --git a/doc/api/http_api.md b/doc/api/http_api.md index e73109b0..8ce50081 100644 --- a/doc/api/http_api.md +++ b/doc/api/http_api.md @@ -60,9 +60,12 @@ Portal submits content into new blog post ## Usage +### API version +The latest version is `1.2` + ### Request Format -The API is accessible via HTTP. HTTP Requests are in the format /api/$APIVERSION/$FUNCTIONNAME. Parameters are transmitted via HTTP GET. $APIVERSION depends on the endpoints you want to use. The latest version is `1.1` +The API is accessible via HTTP. HTTP Requests are in the format /api/$APIVERSION/$FUNCTIONNAME. Parameters are transmitted via HTTP GET. $APIVERSION depends on the endpoints you want to use. ### Response Format Responses are valid JSON in the following format: @@ -409,7 +412,7 @@ sends a custom message of type `msg` to the pad * `{code: 1, message:"padID does not exist", data: null}` #### checkToken() - * API >= 1 + * API >= 1.2 returns ok when api token is valid diff --git a/src/node/handler/APIHandler.js b/src/node/handler/APIHandler.js index 198ec97b..0bcd5f0c 100644 --- a/src/node/handler/APIHandler.js +++ b/src/node/handler/APIHandler.js @@ -68,7 +68,6 @@ var version = , "isPasswordProtected" : ["padID"] , "listAuthorsOfPad" : ["padID"] , "padUsersCount" : ["padID"] - , "checkToken" : [] } , "1.1": { "createGroup" : [] @@ -103,6 +102,40 @@ var version = , "padUsers" : ["padID"] , "sendClientsMessage" : ["padID", "msg"] , "listAllGroups" : [] + } +, "1.2": + { "createGroup" : [] + , "createGroupIfNotExistsFor" : ["groupMapper"] + , "deleteGroup" : ["groupID"] + , "listPads" : ["groupID"] + , "createPad" : ["padID", "text"] + , "createGroupPad" : ["groupID", "padName", "text"] + , "createAuthor" : ["name"] + , "createAuthorIfNotExistsFor": ["authorMapper" , "name"] + , "listPadsOfAuthor" : ["authorID"] + , "createSession" : ["groupID", "authorID", "validUntil"] + , "deleteSession" : ["sessionID"] + , "getSessionInfo" : ["sessionID"] + , "listSessionsOfGroup" : ["groupID"] + , "listSessionsOfAuthor" : ["authorID"] + , "getText" : ["padID", "rev"] + , "setText" : ["padID", "text"] + , "getHTML" : ["padID", "rev"] + , "setHTML" : ["padID", "html"] + , "getRevisionsCount" : ["padID"] + , "getLastEdited" : ["padID"] + , "deletePad" : ["padID"] + , "getReadOnlyID" : ["padID"] + , "setPublicStatus" : ["padID", "publicStatus"] + , "getPublicStatus" : ["padID"] + , "setPassword" : ["padID", "password"] + , "isPasswordProtected" : ["padID"] + , "listAuthorsOfPad" : ["padID"] + , "padUsersCount" : ["padID"] + , "getAuthorName" : ["authorID"] + , "padUsers" : ["padID"] + , "sendClientsMessage" : ["padID", "msg"] + , "listAllGroups" : [] , "checkToken" : [] } }; |