Class: Twitterland::FollerMe
- Inherits:
-
Object
- Object
- Twitterland::FollerMe
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/foller_me.rb
Class Method Summary (collapse)
-
+ (Object) hashtags(username, options = {})
Get hashtags for a specific user.
-
+ (Object) mentions(username, options = {})
Get mentions for a specific user.
-
+ (Object) terms(username, options = {})
Get terms for a specific user.
-
+ (Object) topics(username, options = {})
Get topics for a specific user.
Class Method Details
+ (Object) hashtags(username, options = {})
Get hashtags for a specific user
Twitterland::FollerMe.hashtags('pengwynn', options)
options:
exclude => 'rails,ruby'
render => true|false
font_min => 12
font_max => 20
16 17 18 |
# File 'lib/twitterland/foller_me.rb', line 16 def self.(username, ={}) terms(username, {:terms => 'hashtags'}.merge()) end |
+ (Object) mentions(username, options = {})
Get mentions for a specific user
Twitterland::FollerMe.mentions('pengwynn', options)
options:
exclude => 'mully,jdirt'
render => true|false
font_min => 12
font_max => 20
40 41 42 |
# File 'lib/twitterland/foller_me.rb', line 40 def self.mentions(username, ={}) terms(username, {:terms => 'mentions'}.merge()) end |
+ (Object) terms(username, options = {})
Get terms for a specific user
Twitterland::FollerMe.terms('pengwynn', options)
options:
terms => 'all|hashtags|topics|mentions}
exclude => 'rails,ruby'
render => true|false
font_min => 12
font_max => 20
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/twitterland/foller_me.rb', line 53 def self.terms(username, ={}) = .to_hash.to_mash terms = .delete('terms') terms ||= 'all' result = Hashie::Mash.new get("/#{username}/#{terms}.json", :query => ) case terms when 'all' result.topics ||= result.delete('terms_topics') result.mentions ||= result.delete('terms_mentions') result. ||= result.delete('terms_hashtags') when 'hashtags' result. ||= result.delete('terms') when 'topics' result.topics ||= result.delete('terms') when 'mentions' result.mentions ||= result.delete('terms') end result end |
+ (Object) topics(username, options = {})
Get topics for a specific user
Twitterland::FollerMe.topics('pengwynn', options)
options:
exclude => 'rails,ruby'
render => true|false
font_min => 12
font_max => 20
28 29 30 |
# File 'lib/twitterland/foller_me.rb', line 28 def self.topics(username, ={}) terms(username, {:terms => 'topics'}.merge()) end |