jnunemaker-twitter 0.4.1 → 0.4.2
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/History +4 -0
- data/Manifest +2 -0
- data/lib/twitter/base.rb +14 -0
- data/lib/twitter/search_result.rb +83 -0
- data/lib/twitter/search_result_info.rb +82 -0
- data/lib/twitter/version.rb +1 -1
- data/spec/base_spec.rb +12 -0
- data/spec/fixtures/follower_ids.xml +11 -0
- data/spec/fixtures/friend_ids.xml +12 -0
- data/spec/fixtures/friendship_already_exists.xml +5 -0
- data/spec/fixtures/friendship_created.xml +12 -0
- data/spec/fixtures/search_result_info.yml +147 -0
- data/twitter.gemspec +4 -4
- data/website/index.html +4 -13
- metadata +11 -2
data/History
CHANGED
data/Manifest
CHANGED
@@ -42,7 +42,9 @@ README
|
|
42
42
|
spec/base_spec.rb
|
43
43
|
spec/cli/helper_spec.rb
|
44
44
|
spec/direct_message_spec.rb
|
45
|
+
spec/fixtures/follower_ids.xml
|
45
46
|
spec/fixtures/followers.xml
|
47
|
+
spec/fixtures/friend_ids.xml
|
46
48
|
spec/fixtures/friends.xml
|
47
49
|
spec/fixtures/friends_for.xml
|
48
50
|
spec/fixtures/friends_lite.xml
|
data/lib/twitter/base.rb
CHANGED
@@ -35,6 +35,13 @@ module Twitter
|
|
35
35
|
friends(options.merge({:id => id}))
|
36
36
|
end
|
37
37
|
|
38
|
+
# Returns an array of user ids who are friends for the account or the option id/username passed in
|
39
|
+
def friend_ids(id_or_screenname = nil)
|
40
|
+
path = id_or_screenname ? "friends/ids/#{id_or_screenname}.xml" : "friends/ids.xml"
|
41
|
+
doc = request(path, :auth => true)
|
42
|
+
(doc/:id).inject([]) {|ids, id| ids << id.innerHTML; ids}
|
43
|
+
end
|
44
|
+
|
38
45
|
# Returns an array of users who are following you
|
39
46
|
def followers(options={})
|
40
47
|
users(call(:followers, {:args => parse_options(options)}))
|
@@ -44,6 +51,13 @@ module Twitter
|
|
44
51
|
followers(options.merge({:id => id}))
|
45
52
|
end
|
46
53
|
|
54
|
+
# Returns an array of user ids who are followers for the account or the option id/username passed in
|
55
|
+
def follower_ids(id_or_screenname = nil)
|
56
|
+
path = id_or_screenname ? "followers/ids/#{id_or_screenname}.xml" : "followers/ids.xml"
|
57
|
+
doc = request(path, :auth => true)
|
58
|
+
(doc/:id).inject([]) {|ids, id| ids << id.innerHTML; ids}
|
59
|
+
end
|
60
|
+
|
47
61
|
# Returns a single status for a given id
|
48
62
|
def status(id)
|
49
63
|
statuses(call("show/#{id}")).first
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module Twitter
|
2
|
+
class SearchResult < Hash
|
3
|
+
|
4
|
+
# Creates an easier to work with hash from
|
5
|
+
# one with string-based keys
|
6
|
+
def self.new_from_hash(hash)
|
7
|
+
new.merge!(hash)
|
8
|
+
end
|
9
|
+
|
10
|
+
def created_at
|
11
|
+
self['created_at']
|
12
|
+
end
|
13
|
+
|
14
|
+
def created_at=(val)
|
15
|
+
self['created_at'] = val
|
16
|
+
end
|
17
|
+
|
18
|
+
def from_user
|
19
|
+
self['from_user']
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_user=(val)
|
23
|
+
self['from_user'] = val
|
24
|
+
end
|
25
|
+
|
26
|
+
def from_user_id
|
27
|
+
self['from_user_id']
|
28
|
+
end
|
29
|
+
|
30
|
+
def from_user_id=(val)
|
31
|
+
self['from_user_id'] = val
|
32
|
+
end
|
33
|
+
|
34
|
+
def id
|
35
|
+
self['id']
|
36
|
+
end
|
37
|
+
|
38
|
+
def id=(val)
|
39
|
+
self['id'] = val
|
40
|
+
end
|
41
|
+
|
42
|
+
def iso_language_code
|
43
|
+
self['iso_language_code']
|
44
|
+
end
|
45
|
+
|
46
|
+
def iso_language_code=(val)
|
47
|
+
self['iso_language_code'] = val
|
48
|
+
end
|
49
|
+
|
50
|
+
def profile_image_url
|
51
|
+
self['profile_image_url']
|
52
|
+
end
|
53
|
+
|
54
|
+
def profile_image_url=(val)
|
55
|
+
self['profile_image_url'] = val
|
56
|
+
end
|
57
|
+
|
58
|
+
def text
|
59
|
+
self['text']
|
60
|
+
end
|
61
|
+
|
62
|
+
def text=(val)
|
63
|
+
self['text'] = val
|
64
|
+
end
|
65
|
+
|
66
|
+
def to_user
|
67
|
+
self['to_user']
|
68
|
+
end
|
69
|
+
|
70
|
+
def to_user=(val)
|
71
|
+
self['to_user'] = val
|
72
|
+
end
|
73
|
+
|
74
|
+
def to_user_id
|
75
|
+
self['to_user_id']
|
76
|
+
end
|
77
|
+
|
78
|
+
def to_user_id=(val)
|
79
|
+
self['to_user_id'] = val
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
module Twitter
|
2
|
+
class SearchResultInfo < Hash
|
3
|
+
|
4
|
+
# Creates an easier to work with hash from
|
5
|
+
# one with string-based keys
|
6
|
+
def self.new_from_hash(hash)
|
7
|
+
i = new
|
8
|
+
i.merge!(hash)
|
9
|
+
search_results = []
|
10
|
+
i.results.each do |r|
|
11
|
+
search_results << SearchResult.new_from_hash(r)
|
12
|
+
end
|
13
|
+
i.results = search_results
|
14
|
+
i
|
15
|
+
end
|
16
|
+
|
17
|
+
def completed_in
|
18
|
+
self['completed_in']
|
19
|
+
end
|
20
|
+
|
21
|
+
def completed_in=(val)
|
22
|
+
self['completed_in'] = val
|
23
|
+
end
|
24
|
+
|
25
|
+
def max_id
|
26
|
+
self['max_id']
|
27
|
+
end
|
28
|
+
|
29
|
+
def max_id=(val)
|
30
|
+
self['max_id'] = val
|
31
|
+
end
|
32
|
+
|
33
|
+
def next_page
|
34
|
+
self['next_page']
|
35
|
+
end
|
36
|
+
|
37
|
+
def next_page=(val)
|
38
|
+
self['next_page'] = val
|
39
|
+
end
|
40
|
+
|
41
|
+
def page
|
42
|
+
self['page']
|
43
|
+
end
|
44
|
+
|
45
|
+
def page=(val)
|
46
|
+
self['page'] = val
|
47
|
+
end
|
48
|
+
|
49
|
+
def refresh_url
|
50
|
+
self['refresh_url']
|
51
|
+
end
|
52
|
+
|
53
|
+
def refresh_url=(val)
|
54
|
+
self['refresh_url'] = val
|
55
|
+
end
|
56
|
+
|
57
|
+
def results_per_page
|
58
|
+
self['results_per_page']
|
59
|
+
end
|
60
|
+
|
61
|
+
def results_per_page=(val)
|
62
|
+
self['results_per_page'] = val
|
63
|
+
end
|
64
|
+
|
65
|
+
def since_id
|
66
|
+
self['since_id']
|
67
|
+
end
|
68
|
+
|
69
|
+
def since_id=(val)
|
70
|
+
self['since_id'] = val
|
71
|
+
end
|
72
|
+
|
73
|
+
def results
|
74
|
+
self['results']
|
75
|
+
end
|
76
|
+
|
77
|
+
def results=(val)
|
78
|
+
self['results'] = val
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
data/lib/twitter/version.rb
CHANGED
data/spec/base_spec.rb
CHANGED
@@ -54,6 +54,12 @@ describe "Twitter::Base" do
|
|
54
54
|
@base.friends(:lite => true).size.should == 15
|
55
55
|
end
|
56
56
|
|
57
|
+
it "should be able to get friend ids" do
|
58
|
+
data = open(File.dirname(__FILE__) + '/fixtures/friend_ids.xml').read
|
59
|
+
@base.should_receive(:request).and_return(Hpricot::XML(data))
|
60
|
+
@base.friend_ids.size.should == 8
|
61
|
+
end
|
62
|
+
|
57
63
|
it "should be able to get friends for another user" do
|
58
64
|
data = open(File.dirname(__FILE__) + '/fixtures/friends_for.xml').read
|
59
65
|
@base.should_receive(:request).and_return(Hpricot::XML(data))
|
@@ -70,6 +76,12 @@ describe "Twitter::Base" do
|
|
70
76
|
timeline.first.name.should == 'Blaine Cook'
|
71
77
|
end
|
72
78
|
|
79
|
+
it "should be able to get follower ids" do
|
80
|
+
data = open(File.dirname(__FILE__) + '/fixtures/follower_ids.xml').read
|
81
|
+
@base.should_receive(:request).and_return(Hpricot::XML(data))
|
82
|
+
@base.follower_ids.size.should == 8
|
83
|
+
end
|
84
|
+
|
73
85
|
it "should be able to create a friendship" do
|
74
86
|
data = open(File.dirname(__FILE__) + '/fixtures/friendship_created.xml').read
|
75
87
|
@base.should_receive(:request).and_return(Hpricot::XML(data))
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<user>
|
3
|
+
<id>4243</id>
|
4
|
+
<name>John Nunemaker</name>
|
5
|
+
<screen_name>jnunemaker</screen_name>
|
6
|
+
<location>Indiana</location>
|
7
|
+
<description>Loves his wife, ruby, notre dame football and iu basketball</description>
|
8
|
+
<profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/52619256/ruby_enterprise_shirt_normal.jpg</profile_image_url>
|
9
|
+
<url>http://addictedtonew.com</url>
|
10
|
+
<protected>false</protected>
|
11
|
+
<followers_count>363</followers_count>
|
12
|
+
</user>
|
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !map:Twitter::SearchResultInfo
|
2
|
+
results:
|
3
|
+
- !map:Twitter::SearchResult
|
4
|
+
text: "@jqr - wow. just really looked at httparty for first time - sweet! - have you been using that a lot?"
|
5
|
+
to_user_id: 176589
|
6
|
+
to_user: jqr
|
7
|
+
from_user: baldwindavid
|
8
|
+
id: 1073680192
|
9
|
+
from_user_id: 804487
|
10
|
+
iso_language_code: en
|
11
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/67146299/before_400_normal.jpg
|
12
|
+
created_at: Tue, 23 Dec 2008 04:20:12 +0000
|
13
|
+
- !map:Twitter::SearchResult
|
14
|
+
text: the httparty gem rocks my socks. no better way to consume web services in ruby.
|
15
|
+
to_user_id:
|
16
|
+
from_user: mildmojo
|
17
|
+
id: 1073135700
|
18
|
+
from_user_id: 2090305
|
19
|
+
iso_language_code: en
|
20
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/65215459/appicon_normal.png
|
21
|
+
created_at: Mon, 22 Dec 2008 22:20:43 +0000
|
22
|
+
- !map:Twitter::SearchResult
|
23
|
+
text: It's an HTTParty and everyone is invited!
|
24
|
+
to_user_id:
|
25
|
+
from_user: mypheme
|
26
|
+
id: 1067975762
|
27
|
+
from_user_id: 3067473
|
28
|
+
iso_language_code: en
|
29
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/67872558/Picture_3_normal.png
|
30
|
+
created_at: Fri, 19 Dec 2008 22:09:23 +0000
|
31
|
+
- !map:Twitter::SearchResult
|
32
|
+
text: dans la famille des clients http,vous connaissiez curb, httparty, mais connaissiez-vous httpclient ? http://dev.ctor.org/httpclient/
|
33
|
+
to_user_id:
|
34
|
+
from_user: rubyfrance
|
35
|
+
id: 1064812719
|
36
|
+
from_user_id: 70780
|
37
|
+
iso_language_code: fr
|
38
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/51884877/twitter_normal.png
|
39
|
+
created_at: Thu, 18 Dec 2008 12:46:27 +0000
|
40
|
+
- !map:Twitter::SearchResult
|
41
|
+
text: "@jnunemaker have you ever seen httparty get a Net::HTTPServerException: 411 "Length Required" back?"
|
42
|
+
to_user_id: 19106
|
43
|
+
to_user: jnunemaker
|
44
|
+
from_user: techpickles
|
45
|
+
id: 1064375973
|
46
|
+
from_user_id: 22902
|
47
|
+
iso_language_code: en
|
48
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/64410494/Photo_9_normal.jpg
|
49
|
+
created_at: Thu, 18 Dec 2008 05:24:23 +0000
|
50
|
+
- !map:Twitter::SearchResult
|
51
|
+
text: playing with the tumblr api, httparty style
|
52
|
+
to_user_id:
|
53
|
+
from_user: techpickles
|
54
|
+
id: 1064355666
|
55
|
+
from_user_id: 22902
|
56
|
+
iso_language_code: en
|
57
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/64410494/Photo_9_normal.jpg
|
58
|
+
created_at: Thu, 18 Dec 2008 05:07:59 +0000
|
59
|
+
- !map:Twitter::SearchResult
|
60
|
+
text: Testing from HTTParty, awesome ruby gem that allows for easy access to APIs over http.
|
61
|
+
to_user_id:
|
62
|
+
from_user: simonreed
|
63
|
+
id: 1063822669
|
64
|
+
from_user_id: 63911
|
65
|
+
iso_language_code: en
|
66
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/53963586/fu_normal.jpg
|
67
|
+
created_at: Wed, 17 Dec 2008 23:21:34 +0000
|
68
|
+
- !map:Twitter::SearchResult
|
69
|
+
text: It's an HTTParty and everyone is invited!
|
70
|
+
to_user_id:
|
71
|
+
from_user: bernsno
|
72
|
+
id: 1063277742
|
73
|
+
from_user_id: 1495935
|
74
|
+
iso_language_code: en
|
75
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/63820805/me_normal.gif
|
76
|
+
created_at: Wed, 17 Dec 2008 18:25:31 +0000
|
77
|
+
- !map:Twitter::SearchResult
|
78
|
+
text: "[ruby] Using Context and Stump to HTTParty like a Wufoo"
|
79
|
+
to_user_id:
|
80
|
+
from_user: rubymentary
|
81
|
+
id: 1062068801
|
82
|
+
from_user_id: 474717
|
83
|
+
iso_language_code: en
|
84
|
+
profile_image_url: http://static.twitter.com/images/default_profile_normal.png
|
85
|
+
created_at: Wed, 17 Dec 2008 03:37:00 +0000
|
86
|
+
- !map:Twitter::SearchResult
|
87
|
+
text: "net/http\xE3\x81\xAEwrapper\xE3\x81\xA0\xE3\x81\xA3\xE3\x81\x9F\xE3\x80\x82\xE3\x80\x82\xE3\x80\x82 > HTTParty re: http://ff.im/h1Dg"
|
88
|
+
to_user_id:
|
89
|
+
from_user: nahi
|
90
|
+
id: 1061821371
|
91
|
+
from_user_id: 36221
|
92
|
+
iso_language_code: "no"
|
93
|
+
profile_image_url: http://static.twitter.com/images/default_profile_normal.png
|
94
|
+
created_at: Wed, 17 Dec 2008 00:58:19 +0000
|
95
|
+
- !map:Twitter::SearchResult
|
96
|
+
text: Using HTTParty to wrap the Wufoo form submit API, as we are switching the Ordered List contact form to Wufoo.
|
97
|
+
to_user_id:
|
98
|
+
from_user: jnunemaker
|
99
|
+
id: 1061117717
|
100
|
+
from_user_id: 19106
|
101
|
+
iso_language_code: en
|
102
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/61024905/black250_normal.jpg
|
103
|
+
created_at: Tue, 16 Dec 2008 18:25:28 +0000
|
104
|
+
- !map:Twitter::SearchResult
|
105
|
+
text: Playing with HTTParty. Like it already. :)
|
106
|
+
to_user_id:
|
107
|
+
from_user: atog
|
108
|
+
id: 1058725999
|
109
|
+
from_user_id: 21795
|
110
|
+
iso_language_code: en
|
111
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/61430136/ikke_vierkant_normal.jpg
|
112
|
+
created_at: Mon, 15 Dec 2008 16:06:26 +0000
|
113
|
+
- !map:Twitter::SearchResult
|
114
|
+
text: HTTParty is like sweet candy...
|
115
|
+
to_user_id:
|
116
|
+
from_user: levicole
|
117
|
+
id: 1055553905
|
118
|
+
from_user_id: 111971
|
119
|
+
iso_language_code: en
|
120
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/24274692/Photo_2_normal.jpg
|
121
|
+
created_at: Sat, 13 Dec 2008 17:52:01 +0000
|
122
|
+
- !map:Twitter::SearchResult
|
123
|
+
text: "thinking httparty needs a bit of morph class generation magic: http://tinyurl.com/6774gz"
|
124
|
+
to_user_id:
|
125
|
+
from_user: delineator
|
126
|
+
id: 1054352107
|
127
|
+
from_user_id: 102024
|
128
|
+
iso_language_code: en
|
129
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/63867007/rob_64_64_normal.png
|
130
|
+
created_at: Fri, 12 Dec 2008 22:53:41 +0000
|
131
|
+
- !map:Twitter::SearchResult
|
132
|
+
text: To use HTTParty, or just net/http? I'm going to have to change some headers, which means digging around. Hrm.
|
133
|
+
to_user_id:
|
134
|
+
from_user: HibiscuS4
|
135
|
+
id: 1050622779
|
136
|
+
from_user_id: 8780
|
137
|
+
iso_language_code: en
|
138
|
+
profile_image_url: http://s3.amazonaws.com/twitter_production/profile_images/60311231/Photo_9_normal.jpg
|
139
|
+
created_at: Thu, 11 Dec 2008 04:13:06 +0000
|
140
|
+
since_id: 0
|
141
|
+
max_id: 1078578631
|
142
|
+
refresh_url: ?since_id=1078578631&q=httparty
|
143
|
+
results_per_page: 15
|
144
|
+
next_page: ?page=2&max_id=1078578631&q=httparty
|
145
|
+
completed_in: 0.018799
|
146
|
+
page: 1
|
147
|
+
query: httparty
|
data/twitter.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{twitter}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["John Nunemaker"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-02-11}
|
10
10
|
s.default_executable = %q{twitter}
|
11
11
|
s.description = %q{a command line interface for twitter, also a library which wraps the twitter api}
|
12
12
|
s.email = %q{nunemaker@gmail.com}
|
13
13
|
s.executables = ["twitter"]
|
14
|
-
s.extra_rdoc_files = ["bin/twitter", "lib/twitter/base.rb", "lib/twitter/cli/config.rb", "lib/twitter/cli/helpers.rb", "lib/twitter/cli/migrations/20080722194500_create_accounts.rb", "lib/twitter/cli/migrations/20080722194508_create_tweets.rb", "lib/twitter/cli/migrations/20080722214605_add_account_id_to_tweets.rb", "lib/twitter/cli/migrations/20080722214606_create_configurations.rb", "lib/twitter/cli/models/account.rb", "lib/twitter/cli/models/configuration.rb", "lib/twitter/cli/models/tweet.rb", "lib/twitter/cli.rb", "lib/twitter/direct_message.rb", "lib/twitter/easy_class_maker.rb", "lib/twitter/rate_limit_status.rb", "lib/twitter/search.rb", "lib/twitter/status.rb", "lib/twitter/user.rb", "lib/twitter/version.rb", "lib/twitter.rb", "README"]
|
15
|
-
s.files = ["bin/twitter", "examples/blocks.rb", "examples/direct_messages.rb", "examples/favorites.rb", "examples/friends_followers.rb", "examples/friendships.rb", "examples/identica_timeline.rb", "examples/location.rb", "examples/posting.rb", "examples/replies.rb", "examples/search.rb", "examples/sent_messages.rb", "examples/timeline.rb", "examples/twitter.rb", "examples/verify_credentials.rb", "History", "lib/twitter/base.rb", "lib/twitter/cli/config.rb", "lib/twitter/cli/helpers.rb", "lib/twitter/cli/migrations/20080722194500_create_accounts.rb", "lib/twitter/cli/migrations/20080722194508_create_tweets.rb", "lib/twitter/cli/migrations/20080722214605_add_account_id_to_tweets.rb", "lib/twitter/cli/migrations/20080722214606_create_configurations.rb", "lib/twitter/cli/models/account.rb", "lib/twitter/cli/models/configuration.rb", "lib/twitter/cli/models/tweet.rb", "lib/twitter/cli.rb", "lib/twitter/direct_message.rb", "lib/twitter/easy_class_maker.rb", "lib/twitter/rate_limit_status.rb", "lib/twitter/search.rb", "lib/twitter/status.rb", "lib/twitter/user.rb", "lib/twitter/version.rb", "lib/twitter.rb", "License", "Manifest", "Rakefile", "README", "spec/base_spec.rb", "spec/cli/helper_spec.rb", "spec/direct_message_spec.rb", "spec/fixtures/followers.xml", "spec/fixtures/friends.xml", "spec/fixtures/friends_for.xml", "spec/fixtures/friends_lite.xml", "spec/fixtures/friends_timeline.xml", "spec/fixtures/public_timeline.xml", "spec/fixtures/rate_limit_status.xml", "spec/fixtures/search_results.json", "spec/fixtures/status.xml", "spec/fixtures/user.xml", "spec/fixtures/user_timeline.xml", "spec/search_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/status_spec.rb", "spec/user_spec.rb", "twitter.gemspec", "website/css/common.css", "website/images/terminal_output.png", "website/index.html"]
|
14
|
+
s.extra_rdoc_files = ["bin/twitter", "lib/twitter/base.rb", "lib/twitter/cli/config.rb", "lib/twitter/cli/helpers.rb", "lib/twitter/cli/migrations/20080722194500_create_accounts.rb", "lib/twitter/cli/migrations/20080722194508_create_tweets.rb", "lib/twitter/cli/migrations/20080722214605_add_account_id_to_tweets.rb", "lib/twitter/cli/migrations/20080722214606_create_configurations.rb", "lib/twitter/cli/models/account.rb", "lib/twitter/cli/models/configuration.rb", "lib/twitter/cli/models/tweet.rb", "lib/twitter/cli.rb", "lib/twitter/direct_message.rb", "lib/twitter/easy_class_maker.rb", "lib/twitter/rate_limit_status.rb", "lib/twitter/search.rb", "lib/twitter/search_result.rb", "lib/twitter/search_result_info.rb", "lib/twitter/status.rb", "lib/twitter/user.rb", "lib/twitter/version.rb", "lib/twitter.rb", "README"]
|
15
|
+
s.files = ["bin/twitter", "examples/blocks.rb", "examples/direct_messages.rb", "examples/favorites.rb", "examples/friends_followers.rb", "examples/friendships.rb", "examples/identica_timeline.rb", "examples/location.rb", "examples/posting.rb", "examples/replies.rb", "examples/search.rb", "examples/sent_messages.rb", "examples/timeline.rb", "examples/twitter.rb", "examples/verify_credentials.rb", "History", "lib/twitter/base.rb", "lib/twitter/cli/config.rb", "lib/twitter/cli/helpers.rb", "lib/twitter/cli/migrations/20080722194500_create_accounts.rb", "lib/twitter/cli/migrations/20080722194508_create_tweets.rb", "lib/twitter/cli/migrations/20080722214605_add_account_id_to_tweets.rb", "lib/twitter/cli/migrations/20080722214606_create_configurations.rb", "lib/twitter/cli/models/account.rb", "lib/twitter/cli/models/configuration.rb", "lib/twitter/cli/models/tweet.rb", "lib/twitter/cli.rb", "lib/twitter/direct_message.rb", "lib/twitter/easy_class_maker.rb", "lib/twitter/rate_limit_status.rb", "lib/twitter/search.rb", "lib/twitter/search_result.rb", "lib/twitter/search_result_info.rb", "lib/twitter/status.rb", "lib/twitter/user.rb", "lib/twitter/version.rb", "lib/twitter.rb", "License", "Manifest", "Rakefile", "README", "spec/base_spec.rb", "spec/cli/helper_spec.rb", "spec/direct_message_spec.rb", "spec/fixtures/follower_ids.xml", "spec/fixtures/followers.xml", "spec/fixtures/friend_ids.xml", "spec/fixtures/friends.xml", "spec/fixtures/friends_for.xml", "spec/fixtures/friends_lite.xml", "spec/fixtures/friends_timeline.xml", "spec/fixtures/friendship_already_exists.xml", "spec/fixtures/friendship_created.xml", "spec/fixtures/public_timeline.xml", "spec/fixtures/rate_limit_status.xml", "spec/fixtures/search_result_info.yml", "spec/fixtures/search_results.json", "spec/fixtures/status.xml", "spec/fixtures/user.xml", "spec/fixtures/user_timeline.xml", "spec/search_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/status_spec.rb", "spec/user_spec.rb", "twitter.gemspec", "website/css/common.css", "website/images/terminal_output.png", "website/index.html"]
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.homepage = %q{http://twitter.rubyforge.org}
|
18
18
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Twitter", "--main", "README"]
|
data/website/index.html
CHANGED
@@ -87,7 +87,10 @@ Twitter::Search.new.from('jnunemaker').to('oaknd1').fetch()
|
|
87
87
|
|
88
88
|
<p><img src="images/terminal_output.png" alt="Terminal Output" style="width:560px;" /></p>
|
89
89
|
|
90
|
-
<p
|
90
|
+
<p>I removed the command line dependencies from the gem dependencies list so if you want to use the command line part of the twitter gem be sure to install the following gems as well.</p>
|
91
|
+
|
92
|
+
<pre><code>$ sudo gem install main highline sqlite3-ruby
|
93
|
+
$ sudo gem install activerecord -v 2.2.2</code></pre>
|
91
94
|
|
92
95
|
<p>The first thing you'll want to do is install the database so your account(s) can be stored.</p>
|
93
96
|
|
@@ -127,18 +130,6 @@ Account List
|
|
127
130
|
|
128
131
|
<h2>Support</h2>
|
129
132
|
<p>Conversations welcome in the <a href="http://groups.google.com/group/ruby-twitter-gem">google group</a> and bugs/features over at <a href="http://jnunemaker.lighthouseapp.com/projects/14843-twitter-gem/overview">lighthouse</a></p>
|
130
|
-
|
131
|
-
<h2>Uses</h2>
|
132
|
-
<ul>
|
133
|
-
<li><a href="http://snitch.rubyforge.org">Snitch</a></li>
|
134
|
-
<li><a href="http://al3x.net/entries/766">Growl + Twitter</a></li>
|
135
|
-
<li><a href="http://snippets.dzone.com/posts/show/3714">Twitter Woot Bot</a> (<a href="http://soylentfoo.jnewland.com/articles/2007/03/22/woot-twitter-bot-now-official">more here</a>)</li>
|
136
|
-
<li><a href="http://soylentfoo.jnewland.com/articles/2007/01/22/tweet-update-twitter-via-quicksilver">Tweet Quicksilver Action</a></li>
|
137
|
-
<li><a href="http://blog.evanweaver.com/articles/2007/02/09/log-system-security-events-to-twitter">logging security events to twitter</a></li>
|
138
|
-
<li><a href="http://shareomatic.com/">Shareomatic</a> is using it for their <a href="http://twitter.com/shareomatic">twitter account</a></li>
|
139
|
-
</ul>
|
140
|
-
|
141
|
-
<p>Using the twitter gem for something, <a href="mailto:nunemaker@gmail.com">let me know</a> and I'll add you above.</p>
|
142
133
|
</div>
|
143
134
|
|
144
135
|
<div id="footer">
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jnunemaker-twitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-11 00:00:00 -08:00
|
13
13
|
default_executable: twitter
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -71,6 +71,8 @@ extra_rdoc_files:
|
|
71
71
|
- lib/twitter/easy_class_maker.rb
|
72
72
|
- lib/twitter/rate_limit_status.rb
|
73
73
|
- lib/twitter/search.rb
|
74
|
+
- lib/twitter/search_result.rb
|
75
|
+
- lib/twitter/search_result_info.rb
|
74
76
|
- lib/twitter/status.rb
|
75
77
|
- lib/twitter/user.rb
|
76
78
|
- lib/twitter/version.rb
|
@@ -108,6 +110,8 @@ files:
|
|
108
110
|
- lib/twitter/easy_class_maker.rb
|
109
111
|
- lib/twitter/rate_limit_status.rb
|
110
112
|
- lib/twitter/search.rb
|
113
|
+
- lib/twitter/search_result.rb
|
114
|
+
- lib/twitter/search_result_info.rb
|
111
115
|
- lib/twitter/status.rb
|
112
116
|
- lib/twitter/user.rb
|
113
117
|
- lib/twitter/version.rb
|
@@ -119,13 +123,18 @@ files:
|
|
119
123
|
- spec/base_spec.rb
|
120
124
|
- spec/cli/helper_spec.rb
|
121
125
|
- spec/direct_message_spec.rb
|
126
|
+
- spec/fixtures/follower_ids.xml
|
122
127
|
- spec/fixtures/followers.xml
|
128
|
+
- spec/fixtures/friend_ids.xml
|
123
129
|
- spec/fixtures/friends.xml
|
124
130
|
- spec/fixtures/friends_for.xml
|
125
131
|
- spec/fixtures/friends_lite.xml
|
126
132
|
- spec/fixtures/friends_timeline.xml
|
133
|
+
- spec/fixtures/friendship_already_exists.xml
|
134
|
+
- spec/fixtures/friendship_created.xml
|
127
135
|
- spec/fixtures/public_timeline.xml
|
128
136
|
- spec/fixtures/rate_limit_status.xml
|
137
|
+
- spec/fixtures/search_result_info.yml
|
129
138
|
- spec/fixtures/search_results.json
|
130
139
|
- spec/fixtures/status.xml
|
131
140
|
- spec/fixtures/user.xml
|