在etherpad lite中,我尝试用api列出pads或组。但我想出以下信息:
{"code":2,"message":"createHTTPError.notFound is not a constructor","data":null}我写了一个Java应用程序,我试过使用curl。
卷曲:
curl "http://localhost:9001/api/1/listAllPads&apikey=477da...
"code":2,"message":"createHTTPError.notFound is not a constructor","data":null}
curl "http://localhost:9001/api/1/listAllGroups?apikey=477da3361...
{"code":2,"message":"createHTTPError.notFound is not a constructor","data":null}创建作者、组、组和会话的pad与api一起工作。
环境:
Windows 10
Node.js v12.17.0
没有代理,直接访问
数据库postgres
版号: 1.8.4
吉特沙: 6a0f73d
已安装插件
ep_auth_session,ep_adminpads2,ep_etherpad-lite,ep_message_all,ep_headings2,ep_real_time_chat,ep_tables3,ep_author_hover
发布于 2020-10-09 08:21:08
调用不支持的函数时发生错误"createHTTPError.notFound不是构造函数“。您指定的api版本(1)只支持以下函数
{ "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"]
, "listAuthorsOfPad" : ["padID"]
, "padUsersCount" : ["padID"]您所请求的函数由API 1.1和1.2.1支持。
在这里,您可以使用各自的API版本https://github.com/ether/etherpad-lite/blob/develop/src/node/handler/APIHandler.js检查函数的完整列表。
解决方案:使用API1.2.1版本(它支持listAllGroups和listAllPads)
curl "http://localhost:9001/api/1.2.1/listAllPads&apikey=477da...
https://stackoverflow.com/questions/63922351
复制相似问题