twitterland 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/History +1 -0
  2. data/README.markdown +151 -0
  3. data/Rakefile +1 -17
  4. data/VERSION.yml +1 -1
  5. metadata +3 -3
  6. data/README.rdoc +0 -17
data/History CHANGED
@@ -1 +1,2 @@
1
+ 0.1.0 - Added TweetBlocker # http://tweetblocker.com/
1
2
  0.0.1 - initial release
@@ -0,0 +1,151 @@
1
+ # twitterland
2
+
3
+ Twitterland is a Ruby gem that bundles various Twitter-related APIs
4
+
5
+ Including:
6
+
7
+ * Follow Cost
8
+ * Twitter Grader
9
+ * Mr. Tweet
10
+ * Twinfluence
11
+ * Twitter Counter
12
+ * TweetBlocker
13
+
14
+ ### Install
15
+ sudo gem install twitterland
16
+
17
+ ### Follow Cost Usage
18
+ # Get follow cost for specified user
19
+ Twitterland::FollowCost.show('bradleyjoyce')
20
+
21
+ => <Mash at_reply_index=24.0 average_tweets_per_day=6.87254901960784 average_tweets_per_day_recently=19.6396220282001 golden_index=3.0 milliscobles_all_time=324.02 milliscobles_recently=925.96 political_index=1.0 profile_image_url="http://s3.amazonaws.com/twitter_production/profile_images/179927752/bradley_normal.png" statuses_count=3505 twitter_created_at="2008/03/14 18:26:52 -0700" username="bradleyjoyce">
22
+
23
+ ### Twitter Grader Usage
24
+ # request your api key at [http://twitter.grader.com/accessrequestform](http://twitter.grader.com/accessrequestform)
25
+ # get twitter grade for user
26
+ api_key = "OU812"
27
+ Twitterland::TwitterGrader.grade('bradleyjoyce', api_key)
28
+
29
+ => 98.4183
30
+
31
+ ### Mr.Tweet Usage
32
+ ##### get your api key at [http://api.mrtweet.com/newapi](http://api.mrtweet.com/newapi)
33
+ #### Initialize Mrtweet
34
+ api_key = 'OU812'
35
+ mt = Twitterland::Mrtweet.new(api_key,'bradleyjoyce')
36
+ #### Is user
37
+ # Check whether the given user is a MrTweet user.
38
+ mt.is_user
39
+
40
+ => true
41
+
42
+ #### Profile
43
+ # Returns MrTweet statistics of the given user
44
+ mt.profile
45
+
46
+ => <Mash conversation=0.225 conversation_percentile=53 frequency=8.98621 frequency_percentile=90 links=0.53 links_percentile=87 recommendations=1>
47
+
48
+ mt.profile.links
49
+
50
+ => 0.53
51
+
52
+ #### Recommendations
53
+ # Returns the latest recommendations the given user received on MrTweet
54
+ mt.recommendations
55
+
56
+ => [<Mash date=Thu Aug 06 01:02:54 -0500 2009 name="billtrammel" text="he is an entrepreneur, and one of the developers of TweetCongress.org, award-winning site promoting government transparency. Plus, he's a good friend.">]
57
+
58
+ mt.recommendations.first.name
59
+
60
+ => "billtrammel"
61
+
62
+ #### Most attention towards
63
+ # Returns the twitter_id's of 3 users that for the given user pays the most attention to
64
+ mt.most_attenion_towards
65
+
66
+ => [15049040, 17993906, 22286046]
67
+
68
+ #### Recommend
69
+ # Creates a recommendation from the given user, to another user (aka "friend_name")
70
+ reason = "Wynn is an awesome entrepreneur, rubyist, designer and friend! Follow him for his useful and entertaining tweets!"
71
+
72
+ friend_name = "pengwynn"
73
+
74
+ mt.recommend(reason,friend_name)
75
+
76
+ => true
77
+
78
+ ### Twinfluence
79
+
80
+ #### Initialize Twinfluence
81
+ username = 'bradleyjoyce'
82
+ password = 'mypassword'
83
+ t = Twitterland::Twinfluence.new(username,password)
84
+
85
+ => #<Twitterland::Twinfluence:0x317ecf8 @username="bradleyjoyce", @password="mypassword">
86
+
87
+ #### User
88
+ # gets twinfluence data for user
89
+ t.user('bradleyjoyce')
90
+
91
+ t.user('bradleyjoyce')
92
+
93
+ => <Mash user=<Mash adrider=<Mash script=[<Mash type="text/javascript">, <Mash src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">]> centralization="24.224443556856" centralization_grade="0.0 Average - Resilient" description="Entrepreneur and Web Developer -- Floxee.com, TweetCongress.org, Sherflock.com, Squeejee.com" followers_count="1315" friends_count="1278" id="14688076" location=nil name="Bradley Joyce" screen_name="bradleyjoyce" second_order="7936664" second_order_grade="Rank: <b>#10,185</b> (93%)" social_capital="6035.4859315589" social_capital_grade="+1.4 High" statuses_count="3511" unix_timestamp="1249683954" url="http://bradleyjoyce.me" velocity="15535.453112211" velocity_grade="+0.1 Fast Average">>
94
+
95
+ ### Twitter Counter
96
+
97
+ #### Show
98
+ tc = Twitterland::TwitterCounter.show('bradleyjoyce')
99
+
100
+ tc.rank
101
+
102
+ => 37194
103
+
104
+ # available methods
105
+ tomorrow_2w
106
+ followers_2w_ago
107
+ followers_yesterday
108
+ followers_current
109
+ friends_current
110
+ next_month
111
+ growth_since_2w
112
+ started_followers
113
+ rank
114
+ user_id
115
+ growth_since
116
+ follow_days
117
+ tomorrow
118
+ next_month_2w
119
+ average_growth
120
+ average_growth_2w
121
+
122
+
123
+ ### TweetBlocker
124
+
125
+ #### User
126
+ # get grade for user
127
+ result = Twitterland::TweetBlocker.user('bradleyjoyce')
128
+
129
+ => <Mash grade="a" score=100 url="http://twitter.com/bradleyjoyce" username="Bradley Joyce">
130
+
131
+ #### Spam
132
+ # report a user as spammer
133
+ Twitterland::TweetBlocker.report_spam('spamtest')
134
+
135
+ #### Rate Limit Status
136
+ # check your rate limit status
137
+ Twitterland::TweetBlocker.rate_limit
138
+
139
+ => <Mash hourly_limit=100 remaining_hits=100 reset_time="2009-08-11 23:12:41 UTC" reset_time_in_seconds=2746>
140
+
141
+ ### Source
142
+ [http://github.com/squeejee/twitterland/](http://github.com/squeejee/twitterland/)
143
+
144
+ ### Documentation
145
+ [http://rdoc.info/projects/squeejee/twitterland](http://rdoc.info/projects/squeejee/twitterland)
146
+
147
+ ### Copyright
148
+ Copyright (c) 2009 Squeejee. See LICENSE for details.
149
+
150
+
151
+
data/Rakefile CHANGED
@@ -68,23 +68,7 @@ begin
68
68
  namespace :rubyforge do
69
69
 
70
70
  desc "Release gem and RDoc documentation to RubyForge"
71
- task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
72
-
73
- namespace :release do
74
- desc "Publish RDoc to RubyForge."
75
- task :docs => [:rdoc] do
76
- config = YAML.load(
77
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
78
- )
79
-
80
- host = "#{config['username']}@rubyforge.org"
81
- remote_dir = "/var/www/gforge-projects/twitterland/rdoc"
82
- local_dir = 'rdoc'
83
-
84
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
85
- end
86
-
87
- end
71
+ task :release => ["rubyforge:release:gem"]
88
72
  end
89
73
  rescue LoadError
90
74
  puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 0
2
+ :patch: 1
3
3
  :major: 0
4
4
  :minor: 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitterland
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wynn Netherland
@@ -90,11 +90,11 @@ executables: []
90
90
  extensions: []
91
91
 
92
92
  extra_rdoc_files:
93
- - README.rdoc
93
+ - README.markdown
94
94
  files:
95
95
  - History
96
96
  - License
97
- - README.rdoc
97
+ - README.markdown
98
98
  - Rakefile
99
99
  - VERSION.yml
100
100
  - lib/twitterland.rb
@@ -1,17 +0,0 @@
1
- = twitterland
2
-
3
- Twitterland is a Ruby gem that bundles various Twitter-related APIs
4
-
5
- == examples
6
-
7
- See the examples directory.
8
-
9
- http://github.com/squeejee/twitterland/tree/master/examples
10
-
11
- == docs
12
-
13
- http://rdoc.info/projects/squeejee/twitterland
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2009 Squeejee. See LICENSE for details.