twitterland 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +15 -0
- data/VERSION.yml +3 -2
- data/lib/twitterland.rb +19 -2
- data/lib/twitterland/foller_me.rb +74 -0
- data/lib/twitterland/tweet_meme/analytics.rb +37 -0
- data/lib/twitterland/tweet_meme/comments.rb +24 -0
- data/lib/twitterland/tweet_meme/stories.rb +54 -0
- data/test/fixtures/foller_me_all.json +1 -0
- data/test/fixtures/foller_me_hashtags.json +86 -0
- data/test/fixtures/foller_me_mentions.json +1 -0
- data/test/fixtures/foller_me_topics.json +1 -0
- data/test/fixtures/tweet_meme_analytics_build.json +1 -0
- data/test/fixtures/tweet_meme_analytics_built.json +21 -0
- data/test/fixtures/tweet_meme_categories.json +1 -0
- data/test/fixtures/tweet_meme_comments.json +2329 -0
- data/test/fixtures/tweet_meme_popular.json +107 -0
- data/test/fixtures/tweet_meme_tweets.json +273 -0
- data/test/fixtures/tweet_meme_url_info.json +1 -0
- data/test/twitterland/foller_me_test.rb +47 -0
- data/test/twitterland/tweet_meme_test.rb +83 -0
- metadata +22 -3
@@ -0,0 +1,107 @@
|
|
1
|
+
{
|
2
|
+
"status": "success",
|
3
|
+
"stories": [{
|
4
|
+
"url": "http:\/\/www.washingtonian.com\/blogarticles\/people\/capitalcomment\/14004.html",
|
5
|
+
"media_type": "news",
|
6
|
+
"title": "Fists Fly After Post Editor Tells Writer, \u201cIt\u2019s the Second Worst Story I Have Seen in Style in 43 Years\u201d - Capital Comment Blog (washingtonian.com)",
|
7
|
+
"created_at": "2009-11-02 16:54:28",
|
8
|
+
"url_count": 414,
|
9
|
+
"comment_count": "0",
|
10
|
+
"alias": "http:\/\/bit.ly\/cXXud",
|
11
|
+
"retweet": "RT @tweetmeme Fists Fly After Post Editor Tells Writer, \u201cIt\u2019s the Second Worst Story I Have Seen in Style in 43 Years... http:\/\/bit.ly\/cXXud"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"url": "http:\/\/blogs.harvardbusiness.org\/cs\/2009\/11\/six_social_media_trends.html",
|
15
|
+
"media_type": "news",
|
16
|
+
"title": "Six Social Media Trends for 2010 - Conversation Starter - HarvardBusiness.org",
|
17
|
+
"created_at": "2009-11-02 15:06:45",
|
18
|
+
"url_count": 1025,
|
19
|
+
"comment_count": "0",
|
20
|
+
"alias": "http:\/\/tinyurl.com\/yh63duu",
|
21
|
+
"retweet": "RT @tweetmeme Six Social Media Trends for 2010 - Conversation Starter - HarvardBusiness.org http:\/\/tinyurl.com\/yh63duu"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"url": "http:\/\/www.wired.com\/epicenter\/2009\/11\/how-i-exposed-fakeapstylebook\/",
|
25
|
+
"media_type": "news",
|
26
|
+
"title": "How I Unmasked @FakeAPStylebook: An Only-On-Twitter Story | Epicenter | Wired.com",
|
27
|
+
"created_at": "2009-11-02 20:05:11",
|
28
|
+
"url_count": 521,
|
29
|
+
"comment_count": "0",
|
30
|
+
"thumbnail": "http:\/\/tweetmeme.s3.amazonaws.com\/thumbs\/248224675.jpg",
|
31
|
+
"alias": "http:\/\/bit.ly\/2ZybtP",
|
32
|
+
"retweet": "RT @tweetmeme How I Unmasked @FakeAPStylebook: An Only-On-Twitter Story | Epicenter | Wired.com http:\/\/bit.ly\/2ZybtP"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"url": "http:\/\/www.inc.com\/magazine\/20091101\/the-way-i-work-jason-fried-of-37signals.html",
|
36
|
+
"media_type": "news",
|
37
|
+
"title": "The Way I Work: Jason Fried of 37Signals",
|
38
|
+
"created_at": "2009-11-02 17:18:02",
|
39
|
+
"url_count": 307,
|
40
|
+
"comment_count": "0",
|
41
|
+
"alias": "http:\/\/bit.ly\/gjLB8",
|
42
|
+
"retweet": "RT @tweetmeme The Way I Work: Jason Fried of 37Signals http:\/\/bit.ly\/gjLB8"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"url": "http:\/\/mashable.com\/2009\/11\/02\/twitter-lists-widget\/",
|
46
|
+
"media_type": "news",
|
47
|
+
"title": "Twitter Lists Widget: Embed Your Lists on Your Blog",
|
48
|
+
"created_at": "2009-11-03T00:34:19+00:00",
|
49
|
+
"url_count": 599,
|
50
|
+
"comment_count": 0,
|
51
|
+
"alias": "http:\/\/bit.ly\/2jDGjT",
|
52
|
+
"retweet": "RT @tweetmeme Twitter Lists Widget: Embed Your Lists on Your Blog http:\/\/bit.ly\/2jDGjT"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"url": "http:\/\/www.youtube.com\/watch?v=GmYfRt-hGpI",
|
56
|
+
"media_type": "video",
|
57
|
+
"title": "YouTube - 30 Seconds to Mars \"This Is War\" ABSOLUTExclusive from Dragon Age: Origins!",
|
58
|
+
"created_at": "2009-11-02 22:58:43",
|
59
|
+
"url_count": 189,
|
60
|
+
"comment_count": "0",
|
61
|
+
"thumbnail": "http:\/\/tweetmeme.s3.amazonaws.com\/thumbs\/248558198.jpg",
|
62
|
+
"alias": "http:\/\/bit.ly\/BGIwI",
|
63
|
+
"retweet": "RT @tweetmeme YouTube - 30 Seconds to Mars \"This Is War\" ABSOLUTExclusive from Dragon Age: Origins! http:\/\/bit.ly\/BGIwI"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"url": "http:\/\/www.youtube.com\/watch?v=UwnFJg57K-k",
|
67
|
+
"media_type": "video",
|
68
|
+
"title": "YouTube - I walk out of the Drs office a survivor!!",
|
69
|
+
"created_at": "2009-11-02 17:59:38",
|
70
|
+
"url_count": 176,
|
71
|
+
"comment_count": 1,
|
72
|
+
"thumbnail": "http:\/\/tweetmeme.s3.amazonaws.com\/thumbs\/247966115.jpg",
|
73
|
+
"alias": "http:\/\/bit.ly\/1cQBB2",
|
74
|
+
"retweet": "RT @tweetmeme YouTube - I walk out of the Drs office a survivor!! http:\/\/bit.ly\/1cQBB2"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"url": "http:\/\/www.engadget.com\/2009\/11\/02\/adobe-engages-apple-in-passive-aggressive-warfare-with-iphones\/",
|
78
|
+
"media_type": "news",
|
79
|
+
"title": "Adobe engages Apple in passive aggressive warfare with iPhone's Flash message",
|
80
|
+
"created_at": "2009-11-02 19:59:05",
|
81
|
+
"url_count": 397,
|
82
|
+
"comment_count": "0",
|
83
|
+
"thumbnail": "http:\/\/tweetmeme.s3.amazonaws.com\/thumbs\/248212527.jpg",
|
84
|
+
"alias": "http:\/\/bit.ly\/14f9VT",
|
85
|
+
"retweet": "RT @tweetmeme Adobe engages Apple in passive aggressive warfare with iPhone's Flash message http:\/\/bit.ly\/14f9VT"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"url": "http:\/\/www.politickernj.com\/matt-friedman\/34725\/democrats-admit-paying-pro-daggett-call-obama-records-robocall-corzine",
|
89
|
+
"media_type": "news",
|
90
|
+
"title": "Democrats admit paying for pro-Daggett call; Obama records robocall for Corzine | Politicker NJ | New Jersey Politics News, Reaction, and Analysis",
|
91
|
+
"created_at": "2009-11-02 22:38:43",
|
92
|
+
"url_count": 125,
|
93
|
+
"comment_count": "0",
|
94
|
+
"alias": "http:\/\/tinyurl.com\/yjguz97",
|
95
|
+
"retweet": "RT @tweetmeme Democrats admit paying for pro-Daggett call; Obama records robocall for Corzine | Politicker NJ ... http:\/\/tinyurl.com\/yjguz97"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"url": "http:\/\/www.amazon.com\/gp\/feature.html\/ref=br_lf_m_1000446381_grlink_1?ie=UTF8&plgroup=1&docId=1000446381",
|
99
|
+
"media_type": "news",
|
100
|
+
"title": "Best Books of 2009: Business & Investing Top 10",
|
101
|
+
"created_at": "2009-11-02 18:45:39",
|
102
|
+
"url_count": 119,
|
103
|
+
"comment_count": "0",
|
104
|
+
"alias": "http:\/\/bit.ly\/11BxlN",
|
105
|
+
"retweet": "RT @tweetmeme Best Books of 2009: Business & Investing Top 10 http:\/\/bit.ly\/11BxlN"
|
106
|
+
}]
|
107
|
+
}
|
@@ -0,0 +1,273 @@
|
|
1
|
+
{
|
2
|
+
"status": "success",
|
3
|
+
"tweets": [{
|
4
|
+
"user": {
|
5
|
+
"id": "245333369",
|
6
|
+
"tweeter": "irun131",
|
7
|
+
"location": "unknown",
|
8
|
+
"url": "http:\/\/a3.twimg.com\/profile_images\/406988129\/twitterProfilePhoto_normal.jpg",
|
9
|
+
"thumb_url": "http:\/\/a3.twimg.com\/profile_images\/406988129\/twitterProfilePhoto_mini.jpg",
|
10
|
+
"status": "user",
|
11
|
+
"ext_name": "Cleo Crouch",
|
12
|
+
"ext_bio": "former professional driving a truck into retirement. deliver steel for castle metals. NRA certified basic pistol instructor. I believe in personal responsibilit",
|
13
|
+
"ext_url": "",
|
14
|
+
"ext_follower_count": "719",
|
15
|
+
"ext_following_count": "828",
|
16
|
+
"ext_location": "parkville, mo",
|
17
|
+
"ext_created_at": "2009-07-27 23:29:08",
|
18
|
+
"score": "22",
|
19
|
+
"thumb_updated_at": "2009-11-03 01:34:52",
|
20
|
+
"profile_updated_at": "2009-10-30 22:06:28",
|
21
|
+
"kudos": "50",
|
22
|
+
"score_updated_at": "2009-11-03 01:34:55",
|
23
|
+
"ext_utc_offset": "-21600"
|
24
|
+
},
|
25
|
+
"tweet": "RT @suzete007: RT @tweetcongress: We the tweeple tweet the Congress of the USA #tweetcongress #floxee http:\/\/bit.ly\/3xxGYr",
|
26
|
+
"created_at": "2009-11-03 03:02:29",
|
27
|
+
"source": "TweetDeck",
|
28
|
+
"id": "5381493791"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"user": {
|
32
|
+
"id": "121675637",
|
33
|
+
"tweeter": "DesireePaquette",
|
34
|
+
"location": "unknown",
|
35
|
+
"url": "http:\/\/a1.twimg.com\/profile_images\/486406078\/Desi_Twitter_pic_2_normal.jpg",
|
36
|
+
"thumb_url": "http:\/\/a1.twimg.com\/profile_images\/486406078\/Desi_Twitter_pic_2_mini.jpg",
|
37
|
+
"status": "user",
|
38
|
+
"ext_name": "Desiree Paquette",
|
39
|
+
"ext_bio": "Freedom fighter, Libertarian, Watchdog, Intrepid Soldier for Liberty, See Watchdog Tools on my site",
|
40
|
+
"ext_url": "http:\/\/www.soldierforliberty.wordpress.com",
|
41
|
+
"ext_follower_count": 1112,
|
42
|
+
"ext_following_count": 1130,
|
43
|
+
"ext_location": "USA",
|
44
|
+
"ext_created_at": "2009-05-16 14:28:59",
|
45
|
+
"score": 37,
|
46
|
+
"thumb_updated_at": "2009-11-03 02:50:45",
|
47
|
+
"profile_updated_at": "2009-10-29 14:49:59",
|
48
|
+
"kudos": "50",
|
49
|
+
"score_updated_at": "2009-11-02 06:26:32",
|
50
|
+
"ext_utc_offset": -18000
|
51
|
+
},
|
52
|
+
"tweet": "RT @Brian90277: Two ways you can tweet Congress http:\/\/tinyurl.com\/6ayskp http:\/\/tweetcongress.org\/ #ocra",
|
53
|
+
"created_at": "2009-11-03 03:02:11",
|
54
|
+
"source": "TweetDeck",
|
55
|
+
"id": "5381486443"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"user": {
|
59
|
+
"id": "142573744",
|
60
|
+
"tweeter": "Tikkun44",
|
61
|
+
"location": "unknown",
|
62
|
+
"url": "http:\/\/a1.twimg.com\/profile_images\/421296936\/map_final244_normal.png",
|
63
|
+
"thumb_url": "http:\/\/a1.twimg.com\/profile_images\/421296936\/map_final244_mini.png",
|
64
|
+
"status": "user",
|
65
|
+
"ext_name": "Clark Davidson",
|
66
|
+
"ext_bio": "Tikkun: to mend, repair, and transform America both individually and collectively",
|
67
|
+
"ext_url": "http:\/\/tikkun44.blogspot.com\/",
|
68
|
+
"ext_follower_count": "748",
|
69
|
+
"ext_following_count": "1001",
|
70
|
+
"ext_location": "Wisconsin",
|
71
|
+
"ext_created_at": "2009-04-16 22:58:58",
|
72
|
+
"score": "30",
|
73
|
+
"thumb_updated_at": "2009-11-02 22:34:59",
|
74
|
+
"profile_updated_at": "2009-10-28 16:20:57",
|
75
|
+
"kudos": "50",
|
76
|
+
"score_updated_at": "2009-11-02 18:31:45",
|
77
|
+
"ext_utc_offset": "-21600"
|
78
|
+
},
|
79
|
+
"tweet": "Tweet members of the House & Senate to pass #hcr w\/the strongest #publicoption possible http:\/\/tweetcongress.org\/ #p2",
|
80
|
+
"created_at": "2009-11-02 18:35:03",
|
81
|
+
"source": "web",
|
82
|
+
"id": "5369533405"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"user": {
|
86
|
+
"id": "289997099",
|
87
|
+
"tweeter": "JenniferJF",
|
88
|
+
"location": null,
|
89
|
+
"url": "http:\/\/a1.twimg.com\/profile_images\/468302812\/Gyllie1_normal.jpg",
|
90
|
+
"thumb_url": "http:\/\/a1.twimg.com\/profile_images\/468302812\/Gyllie1_mini.jpg",
|
91
|
+
"status": "user",
|
92
|
+
"ext_name": "Jennifer Fischer",
|
93
|
+
"ext_bio": null,
|
94
|
+
"ext_url": null,
|
95
|
+
"ext_follower_count": 27,
|
96
|
+
"ext_following_count": 20,
|
97
|
+
"ext_location": null,
|
98
|
+
"ext_created_at": "2009-05-27 05:02:08",
|
99
|
+
"score": "30",
|
100
|
+
"thumb_updated_at": "2009-11-02 17:13:50",
|
101
|
+
"profile_updated_at": "2009-11-02 17:13:50",
|
102
|
+
"kudos": "50",
|
103
|
+
"score_updated_at": "2009-11-02 17:13:50",
|
104
|
+
"ext_utc_offset": null
|
105
|
+
},
|
106
|
+
"tweet": "Pretty nice: RT @tweetcongress: We the tweeple tweet the Congress of the USA #tweetcongress #floxee http:\/\/bit.ly\/3xxGYr",
|
107
|
+
"created_at": "2009-11-02 17:13:45",
|
108
|
+
"source": "web",
|
109
|
+
"id": "5367723894"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"user": {
|
113
|
+
"id": "288159162",
|
114
|
+
"tweeter": "wileyccoyote",
|
115
|
+
"location": "unknown",
|
116
|
+
"url": "http:\/\/a1.twimg.com\/profile_images\/419131152\/eyes_normal.JPG",
|
117
|
+
"thumb_url": "http:\/\/a1.twimg.com\/profile_images\/419131152\/eyes_mini.JPG",
|
118
|
+
"status": "user",
|
119
|
+
"ext_name": "Courtney Wiley",
|
120
|
+
"ext_bio": "Director of Digital Mktg for Neighborhood America | Writer | Editor | Social Media Marketer | Runner | Maker of Super Special Pancakes | All-around Awesome Mom",
|
121
|
+
"ext_url": null,
|
122
|
+
"ext_follower_count": 240,
|
123
|
+
"ext_following_count": 88,
|
124
|
+
"ext_location": "",
|
125
|
+
"ext_created_at": "2009-09-13 18:07:45",
|
126
|
+
"score": "39",
|
127
|
+
"thumb_updated_at": "2009-11-03 01:27:26",
|
128
|
+
"profile_updated_at": "2009-11-02 20:52:28",
|
129
|
+
"kudos": "50",
|
130
|
+
"score_updated_at": "2009-11-03 01:27:38",
|
131
|
+
"ext_utc_offset": -18000
|
132
|
+
},
|
133
|
+
"tweet": "RT @NBHD_America: \"We the Tweeple of the United States . . .\" Have you seen this TweetCongress #gov20 app: http:\/\/bit.ly\/MmV2b | Pretty cool",
|
134
|
+
"created_at": "2009-11-02 16:07:35",
|
135
|
+
"source": "TweetDeck",
|
136
|
+
"id": "5366201177"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"user": {
|
140
|
+
"id": "21867013",
|
141
|
+
"tweeter": "NBHD_America",
|
142
|
+
"location": "unknown",
|
143
|
+
"url": "http:\/\/a3.twimg.com\/profile_images\/64157613\/NA_normal.png",
|
144
|
+
"thumb_url": "http:\/\/a3.twimg.com\/profile_images\/64157613\/NA_mini.png",
|
145
|
+
"status": "user",
|
146
|
+
"ext_name": "Neighborhood America",
|
147
|
+
"ext_bio": "Enterprise social media + mobile marketing solutions. Award-winning SaaS platform ELAvate offers Social CRM + Analytics to drive ROI.",
|
148
|
+
"ext_url": "http:\/\/www.neighborhoodamerica.com\/",
|
149
|
+
"ext_follower_count": "412",
|
150
|
+
"ext_following_count": "393",
|
151
|
+
"ext_location": "Naples, FL",
|
152
|
+
"ext_created_at": "2008-11-11 14:14:54",
|
153
|
+
"score": "39",
|
154
|
+
"thumb_updated_at": "2009-11-03 01:36:57",
|
155
|
+
"profile_updated_at": "2009-10-29 19:13:45",
|
156
|
+
"kudos": "50",
|
157
|
+
"score_updated_at": "2009-11-03 01:37:00",
|
158
|
+
"ext_utc_offset": "-18000"
|
159
|
+
},
|
160
|
+
"tweet": "\"We the Tweeple of the United States . . .\" Have you seen this TweetCongress #gov20 app: http:\/\/bit.ly\/MmV2b | Pretty cool.",
|
161
|
+
"created_at": "2009-11-02 16:04:36",
|
162
|
+
"source": "TweetDeck",
|
163
|
+
"id": "5366131624"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"user": {
|
167
|
+
"id": "287512598",
|
168
|
+
"tweeter": "AudacityofHype",
|
169
|
+
"location": "unknown",
|
170
|
+
"url": "http:\/\/a3.twimg.com\/profile_images\/468437813\/Picture_19_normal.png",
|
171
|
+
"thumb_url": "http:\/\/a3.twimg.com\/profile_images\/468437813\/Picture_19_mini.png",
|
172
|
+
"status": "user",
|
173
|
+
"ext_name": "Dirk Diggler",
|
174
|
+
"ext_bio": "You can't fix stupid, but you can vote it out!!!!!!",
|
175
|
+
"ext_url": null,
|
176
|
+
"ext_follower_count": 88,
|
177
|
+
"ext_following_count": 149,
|
178
|
+
"ext_location": "USA",
|
179
|
+
"ext_created_at": "2009-04-28 18:14:45",
|
180
|
+
"score": "15",
|
181
|
+
"thumb_updated_at": "2009-11-02 20:54:15",
|
182
|
+
"profile_updated_at": "2009-11-02 16:06:46",
|
183
|
+
"kudos": "50",
|
184
|
+
"score_updated_at": "2009-11-02 14:53:29",
|
185
|
+
"ext_utc_offset": -21600
|
186
|
+
},
|
187
|
+
"tweet": "RT @tweetcongress: We the tweeple tweet the Congress of the USA #tweetcongress #floxee http:\/\/bit.ly\/3xxGYr #tlot #tcot",
|
188
|
+
"created_at": "2009-11-02 15:57:31",
|
189
|
+
"source": "web",
|
190
|
+
"id": "5365964975"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"user": {
|
194
|
+
"id": "99321375",
|
195
|
+
"tweeter": "ToddOH43",
|
196
|
+
"location": "unknown",
|
197
|
+
"url": "http:\/\/a3.twimg.com\/profile_images\/435363173\/distress_normal.jpg",
|
198
|
+
"thumb_url": "http:\/\/a3.twimg.com\/profile_images\/435363173\/distress_mini.jpg",
|
199
|
+
"status": "user",
|
200
|
+
"ext_name": "Todd Tolson",
|
201
|
+
"ext_bio": "Son, brother, father, husband, friend, UltraConservative, Occaisonal Motorcycle racer",
|
202
|
+
"ext_url": "",
|
203
|
+
"ext_follower_count": "386",
|
204
|
+
"ext_following_count": "429",
|
205
|
+
"ext_location": "Ohio - usually",
|
206
|
+
"ext_created_at": "2009-04-07 15:58:35",
|
207
|
+
"score": "24",
|
208
|
+
"thumb_updated_at": "2009-11-02 06:00:51",
|
209
|
+
"profile_updated_at": "2009-10-29 18:33:01",
|
210
|
+
"kudos": "50",
|
211
|
+
"score_updated_at": "2009-11-02 01:53:27",
|
212
|
+
"ext_utc_offset": "-18000"
|
213
|
+
},
|
214
|
+
"tweet": "RT @RedDevilRio: The Only Message on the Home Page of http:\/\/tweetcongress.org is \"Just Say NO to HR3962\" ALL HAIL THE TWITS OF LIBERTY! Ya!",
|
215
|
+
"created_at": "2009-11-02 03:16:14",
|
216
|
+
"source": "HootSuite",
|
217
|
+
"id": "5354134926"
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"user": {
|
221
|
+
"id": "230013186",
|
222
|
+
"tweeter": "iDefendFreedom",
|
223
|
+
"location": "unknown",
|
224
|
+
"url": "http:\/\/a3.twimg.com\/profile_images\/502744617\/twitterProfilePhoto_normal.jpg",
|
225
|
+
"thumb_url": "http:\/\/a3.twimg.com\/profile_images\/502744617\/twitterProfilePhoto_mini.jpg",
|
226
|
+
"status": "user",
|
227
|
+
"ext_name": "iSupport Our Troops!",
|
228
|
+
"ext_bio": "Freedom is Not Free-Defend Our Constitution! USMC Veteran, Proud Wife & Mom, Pro2ND Amend;Defender of Liberty, Christian Warrior, TKD Black Belt, Conservative.",
|
229
|
+
"ext_url": null,
|
230
|
+
"ext_follower_count": 1626,
|
231
|
+
"ext_following_count": 2001,
|
232
|
+
"ext_location": "Battle Born State",
|
233
|
+
"ext_created_at": "2009-05-17 17:01:38",
|
234
|
+
"score": "37",
|
235
|
+
"thumb_updated_at": "2009-11-02 09:04:02",
|
236
|
+
"profile_updated_at": "2009-10-30 18:04:29",
|
237
|
+
"kudos": "50",
|
238
|
+
"score_updated_at": "2009-11-01 16:12:59",
|
239
|
+
"ext_utc_offset": -28800
|
240
|
+
},
|
241
|
+
"tweet": "RT @RedDevilRio: The Only Message on the Home Page of http:\/\/tweetcongress.org is \"Just Say NO to HR3962\" - ALL HAIL THE TWITS OF LIBERTY!",
|
242
|
+
"created_at": "2009-11-02 03:15:41",
|
243
|
+
"source": "SimplyTweet",
|
244
|
+
"id": "5354122891"
|
245
|
+
},
|
246
|
+
{
|
247
|
+
"user": {
|
248
|
+
"id": "289687368",
|
249
|
+
"tweeter": "freedom4USA",
|
250
|
+
"location": "unknown",
|
251
|
+
"url": "http:\/\/a3.twimg.com\/profile_images\/404023407\/9545_16465690_normal.jpg",
|
252
|
+
"thumb_url": "http:\/\/a3.twimg.com\/profile_images\/404023407\/9545_16465690_mini.jpg",
|
253
|
+
"status": "user",
|
254
|
+
"ext_name": "freedom fighter mom",
|
255
|
+
"ext_bio": "Conservative, pro-life AZ mom sharing tweets, links, feeds and thoughts on politics, all politics, all the time!",
|
256
|
+
"ext_url": "http:\/\/is.gd\/asiN",
|
257
|
+
"ext_follower_count": "4321",
|
258
|
+
"ext_following_count": "2520",
|
259
|
+
"ext_location": "US",
|
260
|
+
"ext_created_at": "2008-09-26 09:37:38",
|
261
|
+
"score": "52",
|
262
|
+
"thumb_updated_at": "2009-11-03 03:19:01",
|
263
|
+
"profile_updated_at": "2009-10-28 04:08:15",
|
264
|
+
"kudos": "50",
|
265
|
+
"score_updated_at": "2009-11-02 14:09:20",
|
266
|
+
"ext_utc_offset": "-25200"
|
267
|
+
},
|
268
|
+
"tweet": "RT @mikepfs:If u dont Have app on phn or iphone cn still track congress on twitter \u25bahttp:\/\/tweetcongress.org\/ #tcot #teaparty(vi @beulahgg)",
|
269
|
+
"created_at": "2009-11-01 23:12:15",
|
270
|
+
"source": "AIM",
|
271
|
+
"id": "5348743332"
|
272
|
+
}]
|
273
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"status":"success","story":{"title":"Tweet Congress","url":"http:\/\/tweetcongress.org\/","media_type":"news","created_at":"2009-02-19 12:34:01","url_count":1469,"tm_link":"http:\/\/tweetmeme.com\/story\/24066191","comment_count":"0","excerpt":"Awesome site- keep track of your reps and congress [wo]men: http:\/\/tweetcongress.com\/"}}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class FollerMeTest < Test::Unit::TestCase
|
4
|
+
include Twitterland
|
5
|
+
|
6
|
+
context "When hitting the API" do
|
7
|
+
|
8
|
+
should "should display all terms for a user" do
|
9
|
+
stub_get('http://api.foller.me/pengwynn/all.json', 'foller_me_all.json')
|
10
|
+
result = Twitterland::FollerMe.terms('pengwynn')
|
11
|
+
result.topics.keys.size.should == 51
|
12
|
+
result.topics.keys.first.should == 'saints'
|
13
|
+
result.topics.values.first.popularity.should == 2
|
14
|
+
end
|
15
|
+
|
16
|
+
should "should allow options" do
|
17
|
+
stub_get('http://api.foller.me/pengwynn/all.json?font_max=40&exclude=ruby%2Crails&font_min=20', 'foller_me_all.json')
|
18
|
+
result = Twitterland::FollerMe.terms('pengwynn', {:exclude => 'ruby,rails', :font_min => 20, :font_max => 40})
|
19
|
+
result.should_not == nil
|
20
|
+
end
|
21
|
+
|
22
|
+
should "should display topics for a user" do
|
23
|
+
stub_get('http://api.foller.me/pengwynn/topics.json', 'foller_me_topics.json')
|
24
|
+
result = Twitterland::FollerMe.topics('pengwynn')
|
25
|
+
result.topics.keys.size.should == 51
|
26
|
+
result.topics.keys.first.should == 'saints'
|
27
|
+
result.topics.values.first.popularity.should == 2
|
28
|
+
end
|
29
|
+
|
30
|
+
should "should display mentions for a user" do
|
31
|
+
stub_get('http://api.foller.me/pengwynn/mentions.json', 'foller_me_mentions.json')
|
32
|
+
result = Twitterland::FollerMe.mentions('pengwynn')
|
33
|
+
result.mentions.keys.size.should == 103
|
34
|
+
result.mentions.keys.first.should == '@wdperson'
|
35
|
+
result.mentions.values.first.popularity.should == 1
|
36
|
+
end
|
37
|
+
|
38
|
+
should "should display hashtags for a user" do
|
39
|
+
stub_get('http://api.foller.me/pengwynn/hashtags.json', 'foller_me_hashtags.json')
|
40
|
+
result = Twitterland::FollerMe.hashtags('pengwynn')
|
41
|
+
result.hashtags.keys.size.should == 25
|
42
|
+
result.hashtags.keys.first.should == '#typos'
|
43
|
+
result.hashtags.values.first.popularity.should == 1
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
class TweetMemeTest < Test::Unit::TestCase
|
2
|
+
include Twitterland
|
3
|
+
|
4
|
+
context "When hitting the Core API" do
|
5
|
+
|
6
|
+
should "display details for a url" do
|
7
|
+
stub_get('http://api.tweetmeme.com/url_info.json?url=http%3A%2F%2Ftweetcongress.org', 'tweet_meme_url_info.json')
|
8
|
+
info = Twitterland::TweetMeme.url_info('http://tweetcongress.org')
|
9
|
+
info.story.title.should == 'Tweet Congress'
|
10
|
+
info.story.url_count.should == 1469
|
11
|
+
info.story.excerpt.should == 'Awesome site- keep track of your reps and congress [wo]men: http://tweetcongress.com/'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context "when hitting the Stories API" do
|
16
|
+
|
17
|
+
should "should return popular stories" do
|
18
|
+
stub_get('http://api.tweetmeme.com/stories/popular.json', 'tweet_meme_popular.json')
|
19
|
+
stories = Twitterland::TweetMeme::Stories.popular.stories
|
20
|
+
stories.count.should == 10
|
21
|
+
stories.last.title.should == 'Best Books of 2009: Business & Investing Top 10'
|
22
|
+
end
|
23
|
+
|
24
|
+
should "should return recent stories" do
|
25
|
+
stub_get('http://api.tweetmeme.com/stories/recent.json', 'tweet_meme_popular.json')
|
26
|
+
stories = Twitterland::TweetMeme::Stories.recent.stories
|
27
|
+
stories.count.should == 10
|
28
|
+
stories.last.title.should == 'Best Books of 2009: Business & Investing Top 10'
|
29
|
+
end
|
30
|
+
|
31
|
+
should "should return categories" do
|
32
|
+
stub_get('http://api.tweetmeme.com/stories/categories.json', 'tweet_meme_categories.json')
|
33
|
+
categories = Twitterland::TweetMeme::Stories.categories.categories
|
34
|
+
categories.count.should == 8
|
35
|
+
categories.last.name.should == 'worldbusiness'
|
36
|
+
end
|
37
|
+
|
38
|
+
should "should return tweets for a given url" do
|
39
|
+
stub_get('http://api.tweetmeme.com/stories/tweets.json?url=http%3A%2F%2Ftweetcongress.org&from_id=0', 'tweet_meme_tweets.json')
|
40
|
+
tweets = Twitterland::TweetMeme::Stories.tweets('http://tweetcongress.org').tweets
|
41
|
+
tweets.count.should == 10
|
42
|
+
tweets.first.user.tweeter.should == 'irun131'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "when hitting the Comments API" do
|
47
|
+
|
48
|
+
should "should return the most recent comments along with url info" do
|
49
|
+
stub_get('http://api.tweetmeme.com/comments/firehose.json', 'tweet_meme_comments.json')
|
50
|
+
comments = Twitterland::TweetMeme::Comments.firehose.comments
|
51
|
+
comments.count.should == 100
|
52
|
+
comments.first.user.tweeter.should == 'alfro2004'
|
53
|
+
end
|
54
|
+
|
55
|
+
should "should return comments for a given url" do
|
56
|
+
stub_get('http://api.tweetmeme.com/comments/get_url.json?url=http%3A%2F%2Ftweetcongress.org', 'tweet_meme_comments.json')
|
57
|
+
comments = Twitterland::TweetMeme::Comments.get_url('http://tweetcongress.org').comments
|
58
|
+
comments.count.should == 100
|
59
|
+
comments.first.user.tweeter.should == 'alfro2004'
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "when hitting the Analytics API" do
|
64
|
+
|
65
|
+
should "should return a uid" do
|
66
|
+
stub_get('http://api.tweetmeme.com/analytics/build.json?appid=1234&apikey=OU812&url=http%3A%2F%2Ftweetcongress.org', 'tweet_meme_analytics_build.json')
|
67
|
+
uid = Twitterland::TweetMeme::Analytics.build(1234, 'OU812', 'http://tweetcongress.org')
|
68
|
+
uid.should == '94496fd8227104a06bbb1a07a6ea9e3c'
|
69
|
+
end
|
70
|
+
|
71
|
+
should "should return a list of built analytics" do
|
72
|
+
stub_get('http://api.tweetmeme.com/analytics/built.json?appid=1234&apikey=OU812', 'tweet_meme_analytics_built.json')
|
73
|
+
built = Twitterland::TweetMeme::Analytics.built(1234, 'OU812')
|
74
|
+
built.builtURLs.size.should == 1
|
75
|
+
built.builtURLs.first.name.should == 'tweetcongress.org'
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
end
|