1、Blogger API(http://www.blogger.com/developers/api/1_docs/)

Blogger API

By Evan Williams, 8/7/01

Update: 8/13/01 -Ev.

Update: 6/27/03 -Jason Shellen

Welcome to the Blogger API. This site is for independent developers and partners who are interested in hooking into Blogger with other programs, interfaces, or environments.

Please Note: While we will continue to support the Blogger API we will not be developing it further. We are working along with others in the blogging industry to produce a new, more robust API. You can view the current state of the Echo Project here. For further updates, stay tuned to the bloggerDev mail list and www.blogger.com/developers/.

DISCLAIMER: The current state of this interface is experimental and alpha. I’m sure something’s broken and other things will change. Your help in figuring these things out are appreciated, but no guarantees are made about reliability, robustness, or longevity. Use at your own risk.

Protocols

The Blogger API is currently implemented for XML-RPC. There may be others some day.

Methods

These are the available methods:

blogger.newPost: Makes a new post to a designated blog. Optionally, will publish the blog after making the post.

blogger.editPost: Edits a given post. Optionally, will publish the blog after making the edit.

blogger.getUsersBlogs: Returns information on all the blogs a given user is a member of.

blogger.getUserInfo: Authenticates a user and returns basic user info (name, email, userid, etc.).

blogger.getTemplate: Returns the main or archive index template of a given blog.

blogger.setTemplate: Edits the main or archive index template of a given blog.

More Info

There is a mailing list.

There is also a node in the XML-RPC directory pointing to implementations and such.

AppKeys

Good news, friends! We no longer require appkey registration to use the Blogger API. If you send us an appkey of 0123456789ABCDEF, then everything will work fine.

Each API request requires an application key (”appkey”), which is a unique identifier for each application using the interface. You can register an application and get a key with this form. You can distribute appkeys with source code that uses the API. Please use different keys for different apps. Appkeys will be used for tracking, stats, and, potentially, other stuff.

Acknowledgements

The Blogger API implementation uses the Helma XML-RPC library for Java. Also?: Tomcat. And lots of help from some of the people over here.

Copyright © 2001 Pyra Labs

2、有没有与网志交互的 Web Services APIs?(http://hanhan.blog.ccidnet.com/blog/ccid/do_showone/tid_18919.html)

有没有与网志交互的 Web Services APIs?

作者: hanhan11 发表日期: 2006-01-20 17:19 文章属性: 原创 复制链接 

许多网志引 擎都提供属于自己的 Web service 接口,通过编程与网志交互,但目前还没有出现一种标准化的东西。

.Text 和 dasBlog 两者都提供某些 .asmx 端点,可以通过 SOAP 来实现编辑功能,但其接口是不同的。Blogger.com 提供基于 XML-RPC 的交互式 API (Blogger API)。Userland Software 对Blogger API 的功能进行了增强,并把它叫做 MetaWeblog API。这些可能是当今公认的网志 APIs,但仍然不是所有网志引擎都支持的。还有一个用于添加评论的独力的 API 叫做 Comment API,同样,它也不是被普遍支持。

  Atom 组正在努力解决这些问题,Atom API 定义了一个标准的网志 API 用于发布和编辑网志内容。有关信息请参考 The Atom Project 网站。 

阅读全文(192) | 回复(0) | 推送 | 举报 

3、wordpress的XML-RPC开发(http://wuhongsheng.com/blog/archives/2006/268/)

February 5, 2006

wordpress的XML-RPC开发

Filed under: 技术 — 吴洪声 @ 11:17 pm

wordpress支持使用xml-rpc进行开发。但网络上很少有相关的资料。这两天在做一个离线写blog的东东,研究到了这个东西,顺便做一下记录。

wordpress的xml-rpc支持多种API,根据从xmlrpc.php里面提取的数据,支持的API有:

// Blogger API

‘blogger.getUsersBlogs’ => ‘this:blogger_getUsersBlogs’,

‘blogger.getUserInfo’ => ‘this:blogger_getUserInfo’,

‘blogger.getPost’ => ‘this:blogger_getPost’,

‘blogger.getRecentPosts’ => ‘this:blogger_getRecentPosts’,

‘blogger.getTemplate’ => ‘this:blogger_getTemplate’,

‘blogger.setTemplate’ => ‘this:blogger_setTemplate’,

‘blogger.newPost’ => ‘this:blogger_newPost’,

‘blogger.editPost’ => ‘this:blogger_editPost’,

‘blogger.deletePost’ => ‘this:blogger_deletePost’,

// MetaWeblog API (with MT extensions to structs)

‘metaWeblog.newPost’ => ‘this:mw_newPost’,

‘metaWeblog.editPost’ => ‘this:mw_editPost’,

‘metaWeblog.getPost’ => ‘this:mw_getPost’,

‘metaWeblog.getRecentPosts’ => ‘this:mw_getRecentPosts’,

‘metaWeblog.getCategories’ => ‘this:mw_getCategories’,

‘metaWeblog.newMediaObject’ => ‘this:mw_newMediaObject’,

// MetaWeblog API aliases for Blogger API

// see http://www.xmlrpc.com/stories/storyReader$2460

‘metaWeblog.deletePost’ => ‘this:blogger_deletePost’,

‘metaWeblog.getTemplate’ => ‘this:blogger_getTemplate’,

‘metaWeblog.setTemplate’ => ‘this:blogger_setTemplate’,

‘metaWeblog.getUsersBlogs’ => ‘this:blogger_getUsersBlogs’,

// MovableType API

‘mt.getCategoryList’ => ‘this:mt_getCategoryList’,

‘mt.getRecentPostTitles’ => ‘this:mt_getRecentPostTitles’,

‘mt.getPostCategories’ => ‘this:mt_getPostCategories’,

‘mt.setPostCategories’ => ‘this:mt_setPostCategories’,

‘mt.supportedMethods’ => ‘this:mt_supportedMethods’,

‘mt.supportedTextFilters’ => ‘this:mt_supportedTextFilters’,

‘mt.getTrackbackPings’ => ‘this:mt_getTrackbackPings’,

‘mt.publishPost’ => ‘this:mt_publishPost’,

// PingBack

‘pingback.ping’ => ‘this:pingback_ping’,

‘pingback.extensions.getPingbacks’ => ‘this:pingback_extensions_getPingbacks’,

‘demo.sayHello’ => ‘this:sayHello’,

‘demo.addTwoNumbers’ => ‘this:addTwoNumbers’

其中最后两个API为用于测试的DEMO。

根据XML-RPC的约定,客户端必须向服务器作以下post:

POST /RPC2 HTTP/1.0

User-Agent: Frontier/5.1.2 (WinNT)

Host: betty.userland.com

Content-Type: text/xml

Content-length: 181

<?xml version=”1.0″?>

<methodCall>

<methodName>examples.getStateName</methodName>

<params>

<param>

<value><i4>41</i4></value>

</param>

</params>

</methodCall>

User-Agent和Host项是必须的。

Content-Type的值必须是text/xml.

Content-Length必须指定,而且必须是正确的值。

下面是一个例子:

POST /api/RPC2 HTTP/1.0

User-Agent: Java.Net Wa-Wa 2.0

Host: plant.blogger.com

Content-Type: text/xml

Content-length: 515

<?xml version=”1.0″?>

<methodCall>

<methodName>blogger.newPost</methodName>

<params>

<param><value><string>C6CE3FFB3174106584CBB250C0B0519BF4E294</string></value></param>

<param><value><string>744145</string></value></param>

<param><value><string>ewilliams</string></value></param>

<param><value><string>secret</string></value></param>

<param><value><string>Today I had a peanut butter and pickle

sandwich

for lunch. Do you like peanut-butter and pickle sandwiches? I do.

They’re yummy. Please comment!</string></value></param>

<param><value><boolean>false</boolean></value></param>

</params>

</methodCall>

服务器返回的数据:

HTTP/1.1 200 OK

Connection: close

Content-Length: 125

Content-Type: text/xml

Date: Mon, 6 Aug 20001 19:55:08 GMT

Server: Java.Net Wa-Wa/Linux

<?xml version=”1.0″?>

<methodResponse>

<params>

<param>

<value><string>4515151</string></value>

</param>

</params>

</methodResponse>

如果出现错误,服务器会返回以下内容:

HTTP/1.1 200 OK

Connection: close

Content-Length: 225

Content-Type: text/xml

Date: Mon, 6 Aug 20001 19:55:08 GMT

Server: Java.Net Wa-Wa/Linux

<?xml version=”1.0″?>

<methodResponse>

<fault>

<value>

<struct>

<member>

<name>faultCode</name>

<value><int>4</int></value>

</member>

<member>

<name>faultString</name>

<value><string>java.lang.Exception: java.lang.Exception: Error:

AppKey is

invalid or inactive.</string></value>

</member>

</struct>

</value>

</fault>

</methodResponse>

wordpress, xml rpc

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment