有關 Blogger API、MetaWeblog API、MovableType API的轉帖3篇

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

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 [url]www.blogger.com/developers/.[/url]
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?([url]http://hanhan.blog.ccidnet.com/blog/ccid/do_showone/tid_18919.html[/url])

有沒有與網誌交互的 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開發([url]http://wuhongsheng.com/blog/archives/2006/268/[/url])
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 [url]http://www.xmlrpc.com/stories/storyReader$2460[/url]

‘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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章