Blog XML-RPC API接口
Blog XML-RPC API接口
# blogger.newPost
说明: 建立一则新文章,并选择性地将其出版。
参数: 字符串 appkey, 字符串 blogid, 字符串 username, 字符串 password, 字符串 content, 布尔值 publish
传回值: 成功时为新发表文章的字符串 postid ;失败时为 fault
# blogger.editPost
说明: 更新已有文章的信息。
参数: 字符串 appkey, 字符串 postid, 字符串 username, 字符串 password, 字符串 content, 布尔值 publish
传回值: 成功时布尔值为 true ;失败时为 fault
# blogger.deletePost
说明: 删除一篇文章。
参数: 字符串 appkey, 字符串 postid, 字符串 username, 字符串 password, 布尔值 publish
传回值: 成功时为布尔值 true ;失败时为 fault
# blogger.getRecentPosts
说明: 传回系统中最近发表的文章清单。
参数: 字符串 appkey, 字符串 blogid, 字符串 username, 字符串 password, 整数 numberOfPosts
传回值: 成功时为包含有 ISO.8601 dateCreated, 字符串 userid, 字符串 postid, 字符串 content 结构的数组;失败时为 fault
请注意: dateCreated 会以网志 blogid 的时区来表示
# blogger.getUsersBlogs
说明: 传回某个作者所拥有发表文章权限的网志清单。
参数: 字符串 appkey, 字符串 username, 字符串 password
传回值: 成功时为包含有字符串 url, 字符串 blogid, 字符串 blogName 结构的数组;失败时为 fault
# blogger.getUserInfo
说明: 传回系统上某个作者的信息。
参数: 字符串 appkey, 字符串 username, 字符串 password
传回值: 成功时为包含有字符串 userid, 字符串 firstname, 字符串 lastname, 字符串 nickname, 字符串 email, 字符串 url 的结构;失败时为 fault
请注意: firstname 是 Movable Type 的使用者名称中,第一个空白字符之前的部分;而 lastname 则是那个使用者名称中,第一个空白字符之后的部分。
# metaWeblog.newPost
说明: 建立一则新文章,并选择性地将其出版。
参数: 字符串 blogid, 字符串 username, 字符串 password, 结构 content, 布尔值 publish
传回值: 成功的时候为新文章的字符串 postid ;失败的时候为 fault
请注意: 结构 content 可以包含下列的标准键:文章项目的标题 title 、文章项目的本体 description 以及文章项目的写作日期 dateCreated 。除此之外,在 Movable Type 所植入的版本中,还能让你传递五个其它键的值:整数 mt_allow_comments 是 allow_comments 字段的值;整数 mt_allow_pings 是 allow_pings 字段的值;字符串 mt_convert_breaks 是 convert_breaks 字段的值;字符串 mt_text_more 是文章项目额外文字的值;字符串 mt_excerpt 是文摘字段的值;字符串 mt_keywords 是关键词字段的值;而数组 mt_tb_ping_urls 则是该文章项目引用通告网址的清单。如果加以指定的话, dateCreated 应该要是 ISO.8601 格式。
# metaWeblog.editPost
说明: 更新已有文章的信息。
参数: 字符串 postid, 字符串 username, 字符串 password, 结构 content, 布尔值 publish
传回值: 成功的时候为布尔值 true 失败时为 fault
请注意: 结构 content 可以包含下列的标准键:文章项目的标题 title 、文章项目的本体 description 以及文章项目的写作日期 dateCreated 。除此之外,在 Movable Type 所植入的版本中,还能让你传递五个其它键的值:整数 mt_allow_comments 是 allow_comments 字段的值;整数 mt_allow_pings 是 allow_pings 字段的值;字符串 mt_convert_breaks 是 convert_breaks 字段的值;字符串 mt_text_more 是文章项目额外文字的值;字符串 mt_excerpt 是文摘字段的值;字符串 mt_keywords 是关键词字段的值;而数组 mt_tb_ping_urls 则是该文章项目的引用通告网址清单。如果加以指定的话, dateCreated 应该要是 ISO.8601 格式。
# metaWeblog.getPost
说明: 传回特定文章的信息。
参数: 字符串 postid, 字符串 username, 字符串 password
传回值: 成功的时候为包含字符串 userid, ISO.8601 dateCreated, 字符串 postid, 字符串 description, 字符串 title, 字符串 link, 字符串 permaLink, 字符串 mt_excerpt, 字符串 mt_text_more, 整数 mt_allow_comments, 整数 mt_allow_pings, 字符串 mt_convert_breaks, 字符串 mt_keywords 的结构;失败时为 fault
请注意: link 和 permaLink 都是指到已汇编文章的网址;前置有 mt_ 的字段实际上是 Movable Type 的 metaWeblog.getPost API 扩展部分。
# metaWeblog.getRecentPosts
说明: 传回系统中最近发表的文章清单。
参数: 字符串 blogid, 字符串 username, 字符串 password, 整数 numberOfPosts
传回值: 成功的时候为包含 ISO.8601 dateCreated, 字符串 userid, 字符串 postid, 字符串 description, 字符串 title, 字符串 link, 字符串 permaLink, 字符串 mt_excerpt, 字符串 mt_text_more, 整数 mt_allow_comments, 整数 mt_allow_pings, 字符串 mt_convert_breaks, 字符串 mt_keywords 结构的数组;失败时为 fault
请注意: dateCreated 会以网志 blogid 的时区来表示; link 和 permaLink 都是指到已汇编文章的网址
# metaWeblog.newMediaObject
说明: 上传某个档案到你的网页服务器。
参数: 字符串 blogid, 字符串 username, 字符串 password, 结构 file
传回值: 要上传档案用的网址。
请注意: 结构 file 应该要包含两个键: base64 bits (以 base64 编码过的文档内容)和字符串 name (档名)。 type 键(档案的媒体类别)目前会被忽略掉。
# mt.getRecentPostTitles
说明: 传回一份低频宽即可便利取得的系统最近文章清单。
参数: 字符串 blogid, 字符串 username, 字符串 password, 整数 numberOfPosts
传回值: 成功的时候为包含 ISO.8601 dateCreated, 字符串 userid, 字符串 postid, 字符串 title 结构的数组;失败时为 fault
请注意: dateCreated 会以网志的时区 blogid 来表示
# mt.getCategoryList
说明: 传回所有网志中所定义的类别清单。
参数: 字符串 blogid, 字符串 username, 字符串 password
传回值: 成功的时候为包含字符串 categoryId 和字符串 categoryName 结构的数组;失败时为 fault
# mt.getPostCategories
说明: 传回某文章所指定的所有类别清单。
参数: 字符串 postid, 字符串 username, 字符串 password
传回值: 成功的时候为包含字符串 categoryName, 字符串 categoryId, and 布尔值 isPrimary 结构的数组;失败时为 fault
请注意: isPrimary 代表某个类别是否为该文章的主要类别。
# mt.setPostCategories
说明: 为某篇文章设定类别。
参数: 字符串 postid, 字符串 username, 字符串 password, 数组 categories
传回值: 成功的时候为布尔值 true ;失败时为 fault
请注意: 数组 categories 是包含字符串 categoryId 和 布尔值 isPrimary 结构的数组。你不必须用 isPrimary 来设定主要类别 -- 没有这个旗标时,数组里的第一个结构会被指定成这篇文章的主要类别。
# mt.supportedMethods
说明: 取得服务器所支持的 XML-RPC 方法信息。
参数: 无
传回值: 服务器所支持的方法数组
# mt.getTrackbackPings
说明: 取回送到特定文章项目上的引用通告清单。这个方法可以用来以程序化的方式取回特定文章项目的引用通告清单,而无须对同一个文章项目反覆查询通告,直到建立起特定文章主题对其它文章参考的关系网为止。
参数: 字符串 postid
传回值: 成功的时候为包含字符串 pingTitle (送出通告的文章项目标题), 字符串 pingURL (文章项目的网址)和字符串 pingIP (送出通告的主机 IP 地址)结构的数组。
# mt.publishPost
说明: 出版(重建)所有跟你的网志上特定的文章项目相关的静态档案。相当于把文章项目保存到系统内(但是不送出任何通告)。
参数: 字符串 postid, 字符串 username, 字符串 password
传回值: 成功的时候为布尔值 true ;失败时为 fault