Module: Crown::CGM
- Defined in:
- lib/crown/cgm.rb,
lib/crown/cgm/countable.rb
Defined Under Namespace
Modules: Countable
Class Method Summary collapse
-
.proxy(service) ⇒ Object
------------------------------------------------------------------- #.
Class Method Details
.proxy(service) ⇒ Object
------------------------------------------------------------------- #
proxy
シンボルを利用して目的の CGM の API へアクセスするための Abstract Factory メソッド.実装されている CGM は以下の通り:
- Twitter http://twitter.com/
- Topsy (Twitter のりツイート数カウントサービス) http://topsy.com/
- TweetMeme (同上) http://tweetmeme.com/
- BackType (BackTweets, 同上,要 API key) http://backtweets.com/
- Facebook http://www.facebook.com/
- Google+1 http://www.google.com/intl/ja/+1/button/
- LinkedIn http://www.linkedin.com/
- はてなブックマーク http://b.hatena.ne.jp/
- Livedoor クリップ http://clip.livedoor.com/
- Livedoor Reader http://reader.livedoor.com/
- Delicious http://delicious.com/
- Buzzurl http://buzzurl.jp/
- Yahoo! ブックマーク http://bookmarks.yahoo.co.jp/
------------------------------------------------------------------- #
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/crown/cgm.rb', line 85 def proxy(service) case service when :twitter_user then return Crown::Twitter::User.new when :twitter_uri then return Crown::Twitter::URI.new when :topsy then return Crown::Topsy.new when :tweetmeme then return Crown::TweetMeme.new when :backtype then return Crown::BackType.new when :facebook then return Crown::Facebook.new when :google_plus1 then return Crown::Google::PlusOne.new when :linkedin then return Crown::LinkedIn.new when :hatena_bookmark then return Crown::Hatena::Bookmark.new when :livedoor_clip then return Crown::Livedoor::Clip.new when :livedoor_reader then return Crown::Livedoor::Reader.new when :delicious then return Crown::Delicious.new when :buzzurl then return Crown::Buzzurl.new when :yahoo_bookmark then return Crown::Yahoo::Bookmark.new else return nil end end |