t 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +29 -10
- data/bin/t +4 -25
- data/lib/t/cli.rb +24 -23
- data/lib/t/core_ext/kernel.rb +15 -0
- data/lib/t/core_ext/string.rb +4 -2
- data/lib/t/delete.rb +13 -13
- data/lib/t/format_helpers.rb +62 -0
- data/lib/t/list.rb +4 -4
- data/lib/t/printable.rb +27 -24
- data/lib/t/rcfile.rb +1 -1
- data/lib/t/requestable.rb +0 -4
- data/lib/t/search.rb +10 -11
- data/lib/t/stream.rb +57 -21
- data/lib/t/version.rb +1 -1
- data/lib/t.rb +22 -3
- data/spec/cli_spec.rb +53 -45
- data/spec/fixtures/501_ids.json +509 -1
- data/spec/fixtures/501_users_list.json +17543 -1
- data/spec/fixtures/direct_message.json +80 -1
- data/spec/fixtures/direct_messages.json +802 -1
- data/spec/fixtures/empty_cursor.json +7 -1
- data/spec/fixtures/favorites.json +1099 -1
- data/spec/fixtures/followers_ids.json +10 -1
- data/spec/fixtures/friends_ids.json +9 -1
- data/spec/fixtures/gem.json +61 -1
- data/spec/fixtures/list.json +54 -1
- data/spec/fixtures/lists.json +116 -1
- data/spec/fixtures/locations.json +57 -1
- data/spec/fixtures/not_found.json +4 -1
- data/spec/fixtures/rate_limit_status.json +6 -1
- data/spec/fixtures/recommendations.json +364 -1
- data/spec/fixtures/retweet.json +112 -1
- data/spec/fixtures/search.json +346 -1
- data/spec/fixtures/settings.json +30 -1
- data/spec/fixtures/sferik.json +76 -1
- data/spec/fixtures/status.json +109 -1
- data/spec/fixtures/status_no_attributes.json +104 -1
- data/spec/fixtures/status_no_country.json +102 -1
- data/spec/fixtures/status_no_full_name.json +101 -1
- data/spec/fixtures/status_no_locality.json +107 -1
- data/spec/fixtures/status_no_street_address.json +108 -1
- data/spec/fixtures/statuses.json +1105 -1
- data/spec/fixtures/trends.json +35 -1
- data/spec/fixtures/users.json +92 -1
- data/spec/fixtures/users_list.json +98 -1
- data/spec/list_spec.rb +13 -5
- data/spec/search_spec.rb +110 -102
- data/t.gemspec +1 -2
- metadata +6 -32
@@ -1 +1,10 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"previous_cursor_str": "0",
|
3
|
+
"next_cursor": 0,
|
4
|
+
"ids": [
|
5
|
+
213747670,
|
6
|
+
428004849
|
7
|
+
],
|
8
|
+
"previous_cursor": 0,
|
9
|
+
"next_cursor_str": "0"
|
10
|
+
}
|
data/spec/fixtures/gem.json
CHANGED
@@ -1 +1,61 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"time_zone": "Pacific Time (US & Canada)",
|
3
|
+
"profile_text_color": "333333",
|
4
|
+
"protected": false,
|
5
|
+
"id_str": "213747670",
|
6
|
+
"default_profile": false,
|
7
|
+
"contributors_enabled": false,
|
8
|
+
"following": true,
|
9
|
+
"profile_background_image_url": "http://a0.twimg.com/images/themes/theme15/bg.png",
|
10
|
+
"followers_count": 545,
|
11
|
+
"profile_image_url": "http://a1.twimg.com/profile_images/1163402051/ruby_normal.png",
|
12
|
+
"name": "The Ruby Gem",
|
13
|
+
"profile_link_color": "0084B4",
|
14
|
+
"profile_image_url_https": "https://si0.twimg.com/profile_images/1163402051/ruby_normal.png",
|
15
|
+
"listed_count": 43,
|
16
|
+
"utc_offset": -28800,
|
17
|
+
"created_at": "Tue Nov 09 18:03:22 +0000 2010",
|
18
|
+
"description": "Ruby wrapper for the Twitter API",
|
19
|
+
"notifications": false,
|
20
|
+
"profile_background_color": "022330",
|
21
|
+
"statuses_count": 32,
|
22
|
+
"profile_background_tile": false,
|
23
|
+
"status": {
|
24
|
+
"contributors": null,
|
25
|
+
"coordinates": null,
|
26
|
+
"id_str": "142615165530152960",
|
27
|
+
"retweet_count": 2,
|
28
|
+
"in_reply_to_user_id": null,
|
29
|
+
"favorited": true,
|
30
|
+
"created_at": "Fri Dec 02 14:44:39 +0000 2011",
|
31
|
+
"possibly_sensitive": false,
|
32
|
+
"in_reply_to_screen_name": null,
|
33
|
+
"in_reply_to_status_id": null,
|
34
|
+
"in_reply_to_status_id_str": null,
|
35
|
+
"retweeted": true,
|
36
|
+
"truncated": false,
|
37
|
+
"in_reply_to_user_id_str": null,
|
38
|
+
"place": null,
|
39
|
+
"source": "<a href=\"http://rubygems.org/gems/twitter\" rel=\"nofollow\">The Ruby Gem</a>",
|
40
|
+
"id": 142615165530152960,
|
41
|
+
"geo": null,
|
42
|
+
"text": "Version 2.0.1 has been released. Adds Rails 2.3 compatibility. If you were waiting to upgrade to 2.0, now's the time! http://t.co/cCwpxpFv"
|
43
|
+
},
|
44
|
+
"profile_sidebar_fill_color": "C0DFEC",
|
45
|
+
"default_profile_image": false,
|
46
|
+
"follow_request_sent": false,
|
47
|
+
"lang": "en",
|
48
|
+
"geo_enabled": false,
|
49
|
+
"friends_count": 6,
|
50
|
+
"profile_sidebar_border_color": "a8c7f7",
|
51
|
+
"location": "",
|
52
|
+
"is_translator": false,
|
53
|
+
"show_all_inline_media": false,
|
54
|
+
"screen_name": "gem",
|
55
|
+
"id": 213747670,
|
56
|
+
"verified": false,
|
57
|
+
"profile_use_background_image": true,
|
58
|
+
"profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme15/bg.png",
|
59
|
+
"favourites_count": 4,
|
60
|
+
"url": "http://rubygems.org/gems/twitter"
|
61
|
+
}
|
data/spec/fixtures/list.json
CHANGED
@@ -1 +1,54 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"name": "presidents",
|
3
|
+
"full_name": "@sferik/presidents",
|
4
|
+
"member_count": 2,
|
5
|
+
"description": "Presidents of the United States of America",
|
6
|
+
"mode": "public",
|
7
|
+
"uri": "/sferik/presidents",
|
8
|
+
"user": {
|
9
|
+
"id": 7505382,
|
10
|
+
"profile_image_url": "http://a0.twimg.com/profile_images/1759857427/image1326743606_normal.png",
|
11
|
+
"url": "https://github.com/sferik",
|
12
|
+
"created_at": "Mon Jul 16 12:59:01 +0000 2007",
|
13
|
+
"followers_count": 2126,
|
14
|
+
"default_profile": false,
|
15
|
+
"profile_background_color": "000000",
|
16
|
+
"lang": "en",
|
17
|
+
"utc_offset": -28800,
|
18
|
+
"name": "Erik Michaels-Ober",
|
19
|
+
"profile_background_image_url": "http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png",
|
20
|
+
"location": "San Francisco",
|
21
|
+
"profile_link_color": "0084B4",
|
22
|
+
"listed_count": 115,
|
23
|
+
"verified": false,
|
24
|
+
"protected": false,
|
25
|
+
"profile_use_background_image": true,
|
26
|
+
"is_translator": false,
|
27
|
+
"following": null,
|
28
|
+
"description": "My heart is in the work.",
|
29
|
+
"profile_text_color": "333333",
|
30
|
+
"statuses_count": 6951,
|
31
|
+
"screen_name": "sferik",
|
32
|
+
"profile_image_url_https": "https://si0.twimg.com/profile_images/1759857427/image1326743606_normal.png",
|
33
|
+
"time_zone": "Pacific Time (US & Canada)",
|
34
|
+
"profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png",
|
35
|
+
"friends_count": 204,
|
36
|
+
"default_profile_image": false,
|
37
|
+
"contributors_enabled": false,
|
38
|
+
"profile_sidebar_border_color": "C0DEED",
|
39
|
+
"id_str": "7505382",
|
40
|
+
"geo_enabled": true,
|
41
|
+
"favourites_count": 3124,
|
42
|
+
"profile_background_tile": false,
|
43
|
+
"notifications": null,
|
44
|
+
"show_all_inline_media": true,
|
45
|
+
"profile_sidebar_fill_color": "DDEEF6",
|
46
|
+
"follow_request_sent": null
|
47
|
+
},
|
48
|
+
"id_str": "8863586",
|
49
|
+
"subscriber_count": 1,
|
50
|
+
"created_at": "Mon Mar 15 12:10:13 +0000 2010",
|
51
|
+
"following": false,
|
52
|
+
"slug": "presidents",
|
53
|
+
"id": 8863586
|
54
|
+
}
|
data/spec/fixtures/lists.json
CHANGED
@@ -1 +1,116 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"lists": [
|
3
|
+
{
|
4
|
+
"slug": "code-for-america",
|
5
|
+
"name": "code for america",
|
6
|
+
"full_name": "@sferik/code-for-america",
|
7
|
+
"description": "Code for America",
|
8
|
+
"mode": "public",
|
9
|
+
"uri": "/sferik/code-for-america",
|
10
|
+
"user": {
|
11
|
+
"id": 7505382,
|
12
|
+
"profile_image_url": "http://a0.twimg.com/profile_images/1759857427/image1326743606_normal.png",
|
13
|
+
"url": "https://github.com/sferik",
|
14
|
+
"created_at": "Mon Jul 16 12:59:01 +0000 2007",
|
15
|
+
"followers_count": 2126,
|
16
|
+
"default_profile": false,
|
17
|
+
"profile_background_color": "000000",
|
18
|
+
"lang": "en",
|
19
|
+
"utc_offset": -28800,
|
20
|
+
"name": "Erik Michaels-Ober",
|
21
|
+
"profile_background_image_url": "http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png",
|
22
|
+
"location": "San Francisco",
|
23
|
+
"profile_link_color": "0084B4",
|
24
|
+
"listed_count": 115,
|
25
|
+
"verified": false,
|
26
|
+
"protected": false,
|
27
|
+
"profile_use_background_image": true,
|
28
|
+
"is_translator": false,
|
29
|
+
"following": false,
|
30
|
+
"description": "My heart is in the work.",
|
31
|
+
"profile_text_color": "333333",
|
32
|
+
"statuses_count": 6953,
|
33
|
+
"screen_name": "sferik",
|
34
|
+
"profile_image_url_https": "https://si0.twimg.com/profile_images/1759857427/image1326743606_normal.png",
|
35
|
+
"time_zone": "Pacific Time (US & Canada)",
|
36
|
+
"profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png",
|
37
|
+
"friends_count": 204,
|
38
|
+
"default_profile_image": false,
|
39
|
+
"contributors_enabled": false,
|
40
|
+
"profile_sidebar_border_color": "C0DEED",
|
41
|
+
"id_str": "7505382",
|
42
|
+
"geo_enabled": true,
|
43
|
+
"favourites_count": 3128,
|
44
|
+
"profile_background_tile": false,
|
45
|
+
"notifications": false,
|
46
|
+
"show_all_inline_media": true,
|
47
|
+
"profile_sidebar_fill_color": "DDEEF6",
|
48
|
+
"follow_request_sent": false
|
49
|
+
},
|
50
|
+
"member_count": 26,
|
51
|
+
"id_str": "21718825",
|
52
|
+
"created_at": "Tue Sep 14 21:46:56 +0000 2010",
|
53
|
+
"subscriber_count": 5,
|
54
|
+
"following": false,
|
55
|
+
"id": 21718825
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"slug": "presidents",
|
59
|
+
"name": "presidents",
|
60
|
+
"full_name": "@sferik/presidents",
|
61
|
+
"description": "Presidents of the United States of America",
|
62
|
+
"mode": "public",
|
63
|
+
"uri": "/sferik/presidents",
|
64
|
+
"user": {
|
65
|
+
"id": 7505382,
|
66
|
+
"profile_image_url": "http://a0.twimg.com/profile_images/1759857427/image1326743606_normal.png",
|
67
|
+
"url": "https://github.com/sferik",
|
68
|
+
"created_at": "Mon Jul 16 12:59:01 +0000 2007",
|
69
|
+
"followers_count": 2126,
|
70
|
+
"default_profile": false,
|
71
|
+
"profile_background_color": "000000",
|
72
|
+
"lang": "en",
|
73
|
+
"utc_offset": -28800,
|
74
|
+
"name": "Erik Michaels-Ober",
|
75
|
+
"profile_background_image_url": "http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png",
|
76
|
+
"location": "San Francisco",
|
77
|
+
"profile_link_color": "0084B4",
|
78
|
+
"listed_count": 115,
|
79
|
+
"verified": false,
|
80
|
+
"protected": false,
|
81
|
+
"profile_use_background_image": true,
|
82
|
+
"is_translator": false,
|
83
|
+
"following": false,
|
84
|
+
"description": "My heart is in the work.",
|
85
|
+
"profile_text_color": "333333",
|
86
|
+
"statuses_count": 6953,
|
87
|
+
"screen_name": "sferik",
|
88
|
+
"profile_image_url_https": "https://si0.twimg.com/profile_images/1759857427/image1326743606_normal.png",
|
89
|
+
"time_zone": "Pacific Time (US & Canada)",
|
90
|
+
"profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png",
|
91
|
+
"friends_count": 204,
|
92
|
+
"default_profile_image": false,
|
93
|
+
"contributors_enabled": false,
|
94
|
+
"profile_sidebar_border_color": "C0DEED",
|
95
|
+
"id_str": "7505382",
|
96
|
+
"geo_enabled": true,
|
97
|
+
"favourites_count": 3128,
|
98
|
+
"profile_background_tile": false,
|
99
|
+
"notifications": false,
|
100
|
+
"show_all_inline_media": true,
|
101
|
+
"profile_sidebar_fill_color": "DDEEF6",
|
102
|
+
"follow_request_sent": false
|
103
|
+
},
|
104
|
+
"member_count": 2,
|
105
|
+
"id_str": "8863586",
|
106
|
+
"created_at": "Mon Mar 15 12:10:13 +0000 2010",
|
107
|
+
"subscriber_count": 1,
|
108
|
+
"following": false,
|
109
|
+
"id": 8863586
|
110
|
+
}
|
111
|
+
],
|
112
|
+
"next_cursor": 0,
|
113
|
+
"previous_cursor": 0,
|
114
|
+
"next_cursor_str": "0",
|
115
|
+
"previous_cursor_str": "0"
|
116
|
+
}
|
@@ -1 +1,57 @@
|
|
1
|
-
[
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"placeType": {
|
4
|
+
"code": 7,
|
5
|
+
"name": "Town"
|
6
|
+
},
|
7
|
+
"url": "http://where.yahooapis.com/v1/place/2367105",
|
8
|
+
"countryCode": "US",
|
9
|
+
"woeid": 2367105,
|
10
|
+
"name": "Boston",
|
11
|
+
"country": "United States"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"countryCode": null,
|
15
|
+
"url": "http://where.yahooapis.com/v1/place/1",
|
16
|
+
"woeid": 1,
|
17
|
+
"name": "Worldwide",
|
18
|
+
"country": "",
|
19
|
+
"placeType": {
|
20
|
+
"code": 19,
|
21
|
+
"name": "Supername"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"url": "http://where.yahooapis.com/v1/place/2459115",
|
26
|
+
"woeid": 2459115,
|
27
|
+
"placeType": {
|
28
|
+
"code": 7,
|
29
|
+
"name": "Town"
|
30
|
+
},
|
31
|
+
"countryCode": "US",
|
32
|
+
"name": "New York",
|
33
|
+
"country": "United States"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"countryCode": "US",
|
37
|
+
"url": "http://where.yahooapis.com/v1/place/23424977",
|
38
|
+
"country": "United States",
|
39
|
+
"woeid": 23424977,
|
40
|
+
"name": "United States",
|
41
|
+
"placeType": {
|
42
|
+
"code": 12,
|
43
|
+
"name": "Country"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"placeType": {
|
48
|
+
"code": 7,
|
49
|
+
"name": "Town"
|
50
|
+
},
|
51
|
+
"countryCode": "US",
|
52
|
+
"url": "http://where.yahooapis.com/v1/place/2487956",
|
53
|
+
"woeid": 2487956,
|
54
|
+
"name": "San Francisco",
|
55
|
+
"country": "United States"
|
56
|
+
}
|
57
|
+
]
|
@@ -1 +1,4 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"error": "The specified user is not a member of this list",
|
3
|
+
"request": "/1/lists/members/show.json?owner_screen_name=sferik&slug=presidents&screen_name=sferik"
|
4
|
+
}
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"remaining_hits": 19993,
|
3
|
+
"hourly_limit": 20000,
|
4
|
+
"reset_time_in_seconds": 1288060988,
|
5
|
+
"reset_time": "Tue Oct 26 12:43:08 +0000 2010"
|
6
|
+
}
|