Class: Crown::Topsy
- Inherits:
-
Object
- Object
- Crown::Topsy
- Defined in:
- lib/crown/topsy.rb,
lib/crown/topsy/counter.rb
Defined Under Namespace
Classes: URICounter
Class Method Summary collapse
-
.count(uri, options = {}) ⇒ Object
------------------------------------------------------------------- #.
Instance Method Summary collapse
-
#count(uri, options = {}) ⇒ Object
------------------------------------------------------------------- #.
Class Method Details
.count(uri, options = {}) ⇒ Object
------------------------------------------------------------------- #
BackType.count
BackType (BackTweets) の API を介して,指定した URL への ツイート数を取得する.尚,BackType の API を使用する際には, API key を求められるので options に { :api_key = "your api key" } と言うパラメータを指定する必要がある("your api key" の部分は, BackType で取得した API key).
------------------------------------------------------------------- #
45 46 47 |
# File 'lib/crown/topsy.rb', line 45 def Topsy.count(uri, = {}) return Crown::Topsy::URICounter.new.count(uri, ) end |
Instance Method Details
#count(uri, options = {}) ⇒ Object
------------------------------------------------------------------- #
count
Topsy の API を介して,指定した URL へのツイート数を取得する.
------------------------------------------------------------------- #
56 57 58 |
# File 'lib/crown/topsy.rb', line 56 def count(uri, = {}) return Crown::Topsy::URICounter.new.count(uri, ) end |