Class: Twitterland::TweetBlocker
- Inherits:
-
Object
- Object
- Twitterland::TweetBlocker
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/tweet_blocker.rb
Class Method Summary collapse
-
.rate_limit ⇒ Object
Check API rate limiting.
-
.report_spam(username) ⇒ Object
Report user as spammer.
-
.user(username) ⇒ Object
Get grade for user.
Class Method Details
.rate_limit ⇒ Object
Check API rate limiting
Twitterland::TweetBlocker.rate_limit
26 27 28 |
# File 'lib/twitterland/tweet_blocker.rb', line 26 def self.rate_limit @rate_limit = Mash.new(self.get("/user/rate_limit_status.json")) end |
.report_spam(username) ⇒ Object
Report user as spammer
Twitterland::TweetBlocker.spam('leetspeeker39203959230390235')
17 18 19 20 |
# File 'lib/twitterland/tweet_blocker.rb', line 17 def self.report_spam(username) status = Mash.new(self.get("/spam/#{username}.json")) status['error'].blank? ? status : status['error'] end |
.user(username) ⇒ Object
Get grade for user
Twitterland::TweetBlocker.user('bradleyjoyce')
10 11 12 |
# File 'lib/twitterland/tweet_blocker.rb', line 10 def self.user(username) @result ||= Mash.new(self.get("/username/#{username}.json")).user end |