|
用戶認證
如需要認證帳號,請使用 HTTP Basic 方式認證。
目前可以使用下列方式:
「顯示用戶訊息」:
位置:http://api.buboo.tw/user_timeline.[json|rss|xml] 或 http://api.buboo.tw/user_timeline/buboo.[json|rss|xml]
參數:
uid (選擇) - 使用者帳號,沒有此參數,就必須輸入認證帳號跟密碼。
count (選擇) - 訊息數量,範圍:1~20,預設:20。
範例一:http://api.buboo.tw/user_timeline.rss?uid=buboo&count=15
範例二:http://api.buboo.tw/user_timeline/buboo.rss?count=15
「顯示用戶與朋友的近況」:
位置:http://api.buboo.tw/friends_timeline.[json|rss|xml] 或 http://api.buboo.tw/friends_timeline/buboo.[json|rss|xml]
參數:
uid (選擇) - 使用者帳號,沒有此參數,就必須輸入認證帳號跟密碼。
count (選擇) - 訊息數量,範圍:1~20,預設:20。
範例一:http://api.buboo.tw/friends_timeline.rss?uid=buboo&count=15
範例二:http://api.buboo.tw/friends_timeline/buboo.rss?count=15
「顯示看誰在說話」:
位置:http://api.buboo.tw/public_timeline.[json|rss|xml]
參數:
count (選擇) - 訊息數量,範圍:1~20,預設:20。
範例一:http://api.buboo.tw/public_timeline.rss?count=15
「發佈訊息」:
位置:http://api.buboo.tw/update.[json|xml]
參數:
message (必需) - 訊息內容,必須使用 urlencode 編碼。
source_key (選擇) - 須提出申請,申請後將得到一組key,會依照設定顯示(例:_from [buboo])。
* 申請方式,請寄信到 nlrson812 at gmail dot com,並說明顯示的名稱及服務網址。
============================================================
如果你系統有 cURL,可以非常簡單的用下列的方式使用,範例如下:
顯示看誰在說話:
curl http://api.buboo.tw/public_timeline.rss
顯示用戶消息:
curl -u loginname:password http://api.buboo.tw/user_timeline.rss
顯示用戶與朋友的近況:
curl -u loginname:password http://api.buboo.tw/friends_timeline.rss
發佈消息:
curl -u loginname:password -d message="訊息內容" http://api.buboo.tw/update.xml
|