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、有沒有與網(wǎng)志交互的 Web Services APIs?(http://hanhan.blog.ccidnet.com/blog/ccid/do_showone/tid_18919.html)

有沒有與網(wǎng)志交互的 Web Services APIs?

作者: hanhan11 發(fā)表日期: 2006-01-20 17:19 文章屬性: 原創(chuàng) 復(fù)制鏈接 

許多網(wǎng)志引 擎都提供屬于自己的 Web service 接口,通過編程與網(wǎng)志交互,但目前還沒有出現(xiàn)一種標(biāo)準(zhǔn)化的東西。

.Text 和 dasBlog 兩者都提供某些 .asmx 端點(diǎn),可以通過 SOAP 來實(shí)現(xiàn)編輯功能,但其接口是不同的。Blogger.com 提供基于 XML-RPC 的交互式 API (Blogger API)。Userland Software 對(duì)Blogger API 的功能進(jìn)行了增強(qiáng),并把它叫做 MetaWeblog API。這些可能是當(dāng)今公認(rèn)的網(wǎng)志 APIs,但仍然不是所有網(wǎng)志引擎都支持的。還有一個(gè)用于添加評(píng)論的獨(dú)力的 API 叫做 Comment API,同樣,它也不是被普遍支持。

  Atom 組正在努力解決這些問題,Atom API 定義了一個(gè)標(biāo)準(zhǔn)的網(wǎng)志 API 用于發(fā)布和編輯網(wǎng)志內(nèi)容。有關(guān)信息請(qǐng)參考 The Atom Project 網(wǎng)站。 

閱讀全文(192) | 回復(fù)(0) | 推送 | 舉報(bào) 

3、wordpress的XML-RPC開發(fā)(http://wuhongsheng.com/blog/archives/2006/268/)

February 5, 2006

wordpress的XML-RPC開發(fā)

Filed under: 技術(shù) — 吳洪聲 @ 11:17 pm

wordpress支持使用xml-rpc進(jìn)行開發(fā)。但網(wǎng)絡(luò)上很少有相關(guān)的資料。這兩天在做一個(gè)離線寫blog的東東,研究到了這個(gè)東西,順便做一下記錄。

wordpress的xml-rpc支持多種API,根據(jù)從xmlrpc.php里面提取的數(shù)據(jù),支持的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’

其中最后兩個(gè)API為用于測(cè)試的DEMO。

根據(jù)XML-RPC的約定,客戶端必須向服務(wù)器作以下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項(xiàng)是必須的。

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

Content-Length必須指定,而且必須是正確的值。

下面是一個(gè)例子:

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>

服務(wù)器返回的數(shù)據(jù):

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>

如果出現(xiàn)錯(cuò)誤,服務(wù)器會(huì)返回以下內(nèi)容:

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