首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >etherpad listAll失败

etherpad listAll失败
EN

Stack Overflow用户
提问于 2020-09-16 14:34:10
回答 1查看 308关注 0票数 0

在etherpad lite中,我尝试用api列出pads或组。但我想出以下信息:

代码语言:javascript
复制
{"code":2,"message":"createHTTPError.notFound is not a constructor","data":null}

我写了一个Java应用程序,我试过使用curl。

卷曲:

代码语言:javascript
复制
 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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-09 08:21:08

调用不支持的函数时发生错误"createHTTPError.notFound不是构造函数“。您指定的api版本(1)只支持以下函数

代码语言:javascript
复制
 { "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...

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63922351

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档