我可以使用以下脚本在 Confluence 中创建博客文章:
import sys
from xmlrpclib import Server
user = "user"
passwd = "pass"
serverurl = "<blah-blah>/xmlrpc"
spacekey = "DEV"
s = Server( serverurl )
token = s.confluence1.login( user, passwd )
newblogpostdata = {"title":"title",
"content":"content",
"space":spacekey}
newblogpostdata = s.confluence1.storeBlogEntry(token, newblogpostdata)
但是找不到如何在博客文章中添加一些标签?
更新。最后我使用了以下解决方案: id = newblogpost['id'] s.confluence1.addLabelByName(token, "ctrm", id)