RAILS PRESS RUBY on RAILS, it’s DRY and COOL …

RSS Feed

RAILS PRESS RSS

Tag Cloud

はてなブックマーク - railspress.matake.jp の注目エントリー
象形文字くさび形文字ミイラそろばんの玉そろばんコーラン占いの板?象牙大英博物館
« 前のエントリ
iKnow! の OpenID で XRI をサポート & ruby-openid を日本語 XRI 対応に
次のエントリー »
iKnow! gem 0.2.2

Posted on
2008/11/29

Tags
Gem, GitHub, iKnow!

Keywords


この記事をはてなブックマークに登録 この記事のはてなブックマーク数 この記事を livedoor クリップに登録この記事の livedoor クリップ数 このエントリを del.icio.us に追加
ブックマークに追加する

iKnow! gem をアップデートしました version 0.0.4

新規 Call の反映と、各 Call で追加された Attributes の反映が主な変更点です。Item creation API は Basic 認証で実装してしまおうかと思ってます。いつやるかは未定(アセアセ

相変わらずドキュメントはサンプルコードですが、List / Item / Sentence の find や、User#study.total_summary などが新しく追加されています。また :include_sentences と :include_items は新しく追加されたパラメータです。

LANG : RUBY
  1. ## User API
  2. @user = Iknow::User.find('kirk')
  3. @user.items(:include_sentences => true)
  4. @user.lists
  5. @user.friends
  6. @user.study.results
  7. @user.study.total_summary
  8. @matched_users = Iknow::User.matching('matake')
  9.  
  10. ## List API
  11. @recent_lists = Iknow::List.recent
  12. @list = Iknow::List.find(31509, :include_sentences => true, :include_items => true)
  13. @list.items
  14. @list.sentences
  15. @matched_lists = Iknow::List.matching("イタリア語であいさつ")
  16.  
  17. # puts Iknow::List.find(31509, :include_sentences => true, :include_items => true).inspect
  18.  
  19. ## Item API
  20. @recent_items = Iknow::Item.recent(:include_sentences => true)
  21. @item = Iknow::Item.find(437525)
  22. @matched_items = Iknow::Item.matching('record', :include_sentences => true)
  23. @items = Iknow::Item.extract("sometimes, often, electrical")
  24. @items.first.sentences
  25.  
  26. ## Sentence API
  27. @recent_sentences = Iknow::Sentence.recent
  28. @sentence = Iknow::Sentence.find(312271)
  29. @matched_sentences = Iknow::Sentence.matching('record')

ps.
毎回 gem をいじってると細かいバグとか、微妙に使いづらい点とかに気がつくので、そういった点は API 自体の方にまた反映させていきます。「特定の Call でしか使えないオプションとかすごい分かりづらいので、なるべく全部の Call で使えるものはそうしたい」とか、そういうの。


この記事がお役に立ちましたら、一言コメントもらえると嬉しいですm_ _m


コメントはこちらから




使用可能タグ: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


« 前のエントリ
iKnow! の OpenID で XRI をサポート & ruby-openid を日本語 XRI 対応に
次のエントリー »
iKnow! gem 0.2.2