Class: Twitterland::TweetMeme::Stories
- Inherits:
-
Object
- Object
- Twitterland::TweetMeme::Stories
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/tweet_meme/stories.rb
Class Method Summary (collapse)
-
+ (Object) categories(options = {})
Returns a list of categories down to the specified depth, optionally filtered by a parent category.
-
+ (Object) popular(options = {})
Returns the most popular stories in the last 24 hours.
-
+ (Object) recent(options = {})
Returns the most recent stories found by TweetMeme.
-
+ (Object) tweets(url, from_id = 0)
Returns 10 tweets for the specified URL.
Class Method Details
+ (Object) categories(options = {})
Returns a list of categories down to the specified depth, optionally filtered by a parent category.
parameters:
(optional) filter: string a string to filter the categories by (default is empty string)
(optional) depth: int the depth of categories to return (range 1-10, default 1)
Twitterland::TweetMeme::Stories.categories(options)
38 39 40 |
# File 'lib/twitterland/tweet_meme/stories.rb', line 38 def self.categories(={}) Hashie::Mash.new get("/categories.json", :query => ) end |
+ (Object) popular(options = {})
Returns the most popular stories in the last 24 hours.
parameters:
(optional) count: int how many results to return per page, in the range 1-100, default 10
(optional) category: string an optional category to filter results by, default none
(optional) media: string a filter of media type (news/video/image) with default of all
(optional) page: int the page of results you would like, in the range 1-100 with default 1
Twitterland::TweetMeme::Stories.popular(options)
16 17 18 |
# File 'lib/twitterland/tweet_meme/stories.rb', line 16 def self.popular(={}) Hashie::Mash.new get("/popular.json", :query => ) end |
+ (Object) recent(options = {})
Returns the most recent stories found by TweetMeme.
parameters:
(optional) count: int how many results to return per page, in the range 1-100, default 10
(optional) category: string an optional category to filter results by, default none
(optional) media: string a filter of media type (news/video/image) with default of all
(optional) page: int the page of results you would like, in the range 1-100 with default 1
Twitterland::TweetMeme::Stories.recent(options)
28 29 30 |
# File 'lib/twitterland/tweet_meme/stories.rb', line 28 def self.recent(={}) Hashie::Mash.new get("/recent.json", :query => ) end |
+ (Object) tweets(url, from_id = 0)
Returns 10 tweets for the specified URL.
parameters:
url: string the URL of the page you want tweets for
from_id: int the last Tweet ID you have (it will return tweets after but not including this Tweet ID)
Twitterland::TweetMeme::Stories.tweets(url, from_id)
48 49 50 |
# File 'lib/twitterland/tweet_meme/stories.rb', line 48 def self.tweets(url, from_id=0) Hashie::Mash.new get("/tweets.json", :query => {:url => url, :from_id => from_id}) end |