Skip to content

Commit

Permalink
Updated to latest API level 1.2.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Oct 6, 2015
1 parent 2716abb commit 9d6a063
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
28 changes: 20 additions & 8 deletions main.coffee
Expand Up @@ -21,7 +21,7 @@ exports.connect = (options={}) ->
retriever = https

api.call = (functionName, functionArgs, callback) ->
rootPath = api.options.rootPath or '/api/1.2.1/'
rootPath = api.options.rootPath or '/api/1.2.12/'
apiOptions = _.extend { 'apikey': @options.apikey }, functionArgs
httpOptions =
host: @options.host
Expand All @@ -48,18 +48,19 @@ exports.connect = (options={}) ->
callback { code: -1, message: (error.message or error) }, null


# https://raw.githubusercontent.com/ether/etherpad-lite/develop/src/node/handler/APIHandler.js
apiFunctions = [
'createGroup'
'createGroupIfNotExistsFor'
'deleteGroup'
'listPads'
'listAllPads'
'createDiffHTML'
'createPad'
'createGroupPad'
'listAllGroups'
'createAuthor'
'createAuthorIfNotExistsFor'
'listPadsOfAuthor'
'getAuthorName'
'createSession'
'deleteSession'
'getSessionInfo'
Expand All @@ -69,23 +70,34 @@ exports.connect = (options={}) ->
'setText'
'getHTML'
'setHTML'
'createPad'
'getAttributePool'
'getRevisionsCount'
'padUsersCount'
'padUsers'
'getSavedRevisionsCount'
'listSavedRevisions'
'saveRevision'
'getRevisionChangeset'
'getLastEdited'
'deletePad'
'copyPad'
'movePad'
'getReadOnlyID'
'getPadID'
'setPublicStatus'
'getPublicStatus'
'setPassword'
'isPasswordProtected'
'listAuthorsOfPad'
'getLastEdited'
'padUsersCount'
'getAuthorName'
'padUsers'
'sendClientsMessage'
'listAllPads'
'listAllGroups'
'checkToken'
'appendChatMessage'
'getChatHistory'
'getChatHistory'
'getChatHead'
'restoreRevision'
]

for functionName in apiFunctions
Expand Down
4 changes: 2 additions & 2 deletions main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9d6a063

Please sign in to comment.