只要簡單的四行程式碼,就可以用Groovy寫出Plurk發短訊小工具!
import com.google.jplurk.*
client = new PlurkClient(new ISettings.Simple(API_KEY, Lang.tr_ch))
client.login(__user, __pass)
client.plurkAdd text, Qualifier.LOVES
Plurk為了避免API被濫用,開發者必須先至官方API頁面申請一組API-KEY!(填寫後收E-Mail)
http://www.plurk.com/API
接著下載jPlurk,這是一個Java的Plurk函式庫,幫我們把需要的功能都包裝起來。(下載後解開將*.jar解壓縮至CLASSPATH)
http://code.google.com/p/jplurk/downloads/list
範例如下(Mothership.groovy),必須修改為自己的API-KEY及帳號密碼:
訂閱:
張貼留言 (Atom)
-
▼
2010
(72)
-
▼
8月
(15)
- HTC Desire Android 2.2 release! 官方已開放台灣地區更新
- the plurk-robodog project 噗浪機器狗專案
- 快快樂樂學Groovy使用jPlurk發送Plurk短訊
- [Note] Android Development with HTC Phone + Ubuntu...
- 快快樂樂學Groovy使用GMail發送電子郵件
- PHP網站快速開發筆記 - 使用Codeigniter (一)
- 使用 PEAR::Text_Wiki_Mediawiki 將Mediawiki標記文字轉為HTML代碼
- 快快樂樂學Groovy繪製圓餅圖 Pie Chart using Groovlet & jFreeC...
- 使用Apache Ant控制Tomcat6 Context Reload
- Blogger文章編輯器的HTML編碼工具(HTML Encode Button) Firefox ...
- Groovy 1.7 GroovyServer Pages的Servlet設定
- 技嘉過保固主機板免費換電容
- Windows環境執行Groovy/Groovlet/GSP的編碼問題
- 解決Tomcat 6.0的This is very likely to create a memor...
- 讓Eclipse支援Grails專案開發
-
▼
8月
(15)
沒有留言:
張貼留言