tuiter 0.0.4 → 0.0.5

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/CHANGELOG CHANGED
@@ -1,3 +1,17 @@
1
+ == v0.0.5
2
+ * Version bump and gemspec update
3
+ * Improvements on parse_options
4
+ * direct_messages_sent method implemented and small namespace fix
5
+ * Small fix in Tuiter Client test
6
+ * Merging thomaz/master
7
+ * bug fix on statuses_show
8
+ * tests for client
9
+ * removed quietbacktrace configurations
10
+ * modified tests for new method names, bug fix in Client#statuses_update
11
+ * social_graph/direct_message methods moved to modules
12
+ * status/user/account methods moved to modules
13
+ * friendship methods moved to module
14
+
1
15
  == v0.0.4
2
16
  * Adding remove friendship method
3
17
 
data/lib/tuiter.rb CHANGED
@@ -8,8 +8,13 @@ require 'json'
8
8
  libdir = File.dirname(__FILE__)
9
9
  $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
10
10
 
11
- # Tuiter client and end points
12
- require 'tuiter/client'
11
+ # Tuiter API methods modules
12
+ require 'tuiter/methods/status'
13
+ require 'tuiter/methods/user'
14
+ require 'tuiter/methods/direct_message'
15
+ require 'tuiter/methods/friendship'
16
+ require 'tuiter/methods/social_graph'
17
+ require 'tuiter/methods/account'
13
18
 
14
19
  # Tuiter data structures
15
20
  require 'tuiter/data/user'
@@ -17,3 +22,6 @@ require 'tuiter/data/status'
17
22
  require 'tuiter/data/rate_limit'
18
23
  require 'tuiter/data/direct_message'
19
24
 
25
+ # Tuiter client and end points
26
+ require 'tuiter/client'
27
+
data/lib/tuiter/client.rb CHANGED
@@ -1,6 +1,13 @@
1
1
  module Tuiter
2
2
 
3
3
  class Client
4
+ include Tuiter::StatusMethods
5
+ include Tuiter::UserMethods
6
+ include Tuiter::DirectMessageMethods
7
+ include Tuiter::FriendshipMethods
8
+ include Tuiter::SocialGraphMethods
9
+ include Tuiter::AccountMethods
10
+
4
11
  attr_accessor :username, :password
5
12
 
6
13
  def initialize(options = {})
@@ -11,212 +18,13 @@ module Tuiter
11
18
  @use_proxy = setup_a_proxy?
12
19
  log("initialize()")
13
20
  end
14
-
15
- def update(status, in_reply_to_status_id = nil)
16
- log("update() sending: #{status}")
17
- url = URI.parse('http://twitter.com/statuses/update.json')
18
- req = Net::HTTP::Post.new(url.path)
19
- req.basic_auth @username, @password
20
- req.set_form_data({'status'=>status, 'in_reply_to_status_id'=>in_reply_to_status_id })
21
- res = new_http_for(url).start {|http| http.request(req) }
22
- case res
23
- when Net::HTTPSuccess, Net::HTTPRedirection
24
- log("update() success: OK")
25
- return res # OK
26
- else
27
- log("update() error: #{res.to_s}")
28
- res.error!
29
- end
30
- end
31
-
32
- def direct_new(user, text)
33
- log("direct_new() sending: #{text} to #{user}")
34
- url = URI.parse('http://twitter.com/direct_messages/new.json')
35
- req = Net::HTTP::Post.new(url.path)
36
- req.basic_auth @username, @password
37
- req.set_form_data({'user'=>user, 'text'=>text })
38
- res = new_http_for(url).start {|http| http.request(req) }
39
- case res
40
- when Net::HTTPSuccess, Net::HTTPRedirection
41
- log("direct_new() success: OK")
42
- return res # OK
43
- else
44
- log("direct_new() error: #{res.error!}")
45
- res.error!
46
- end
47
- end
48
-
49
- def direct_list(options = {})
50
- url = 'http://twitter.com/direct_messages.json'
51
- params = parse_options(options) || ""
52
-
53
- if res = request(url+params)
54
- data = JSON.parse(res)
55
- return data.map { |d| DirectMessage.new(d) }
56
- else
57
- return nil
58
- end
59
- end
60
-
61
- def friendship_new(user, follow = nil)
62
- log("friendship_new() following: #{user}")
63
- url = URI.parse("http://twitter.com/friendships/create/#{user}.json")
64
- req = Net::HTTP::Post.new(url.path)
65
- req.basic_auth @username, @password
66
- req.set_form_data({'follow'=>"true"}) if follow
67
- res = new_http_for(url).start {|http| http.request(req) }
68
- case res
69
- when Net::HTTPSuccess, Net::HTTPRedirection
70
- log("friendship_new() success: OK")
71
- return res # OK
72
- else
73
- log("friendship_new() error: #{res.error!}")
74
- res.error!
75
- end
76
- end
77
21
 
78
- def remove_friendship(user, follow = nil)
79
- log("friendship_new() following: #{user}")
80
- url = URI.parse("http://twitter.com/friendships/destroy/#{user}.json")
81
- req = Net::HTTP::Post.new(url.path)
82
- req.basic_auth @username, @password
83
- res = new_http_for(url).start {|http| http.request(req) }
84
- case res
85
- when Net::HTTPSuccess, Net::HTTPRedirection
86
- log("remove_friendship() success: OK")
87
- return res # OK
88
- else
89
- log("remove_friendship() error: #{res.error!}")
90
- res.error!
91
- end
92
- end
93
-
94
- def verify_credentials?
95
- if res = request("http://twitter.com/account/verify_credentials.json")
96
- return UserExtended.new(JSON.parse(res))
97
- else
98
- return nil
99
- end
100
- end
101
-
102
- def get_followers(options = {})
103
- if options[:id]
104
- query = "http://twitter.com/statuses/followers/#{options[:id]}.json"
105
- else
106
- query = "http://twitter.com/statuses/followers.json"
107
- end
108
- if options[:page]
109
- params = "?page=#{options[:page]}"
110
- else
111
- params = ""
112
- end
113
- if res = request(query+params)
114
- data = JSON.parse(res)
115
- return data.map { |d| User.new(d) }
116
- else
117
- return nil
118
- end
119
- end
120
-
121
- def get_followers_ids
122
- if res = request("http://twitter.com/followers/ids/#{username}.json")
123
- return JSON.parse(res)
124
- else
125
- return nil
126
- end
127
- end
128
-
129
- def get_friends(options = {})
130
- if options[:id]
131
- query = "http://twitter.com/statuses/friends/#{options[:id]}.json"
132
- else
133
- query = "http://twitter.com/statuses/friends.json"
134
- end
135
- if options[:page]
136
- params = "?page=#{options[:page]}"
137
- else
138
- params = ""
139
- end
140
- if res = request(query+params)
141
- data = JSON.parse(res)
142
- return data.map { |d| User.new(d) }
143
- else
144
- return nil
145
- end
146
- end
147
-
148
- def get_replies(options = {})
149
- query = "http://twitter.com/statuses/replies.json"
150
- if options[:since]
151
- params = "?since=#{options[:since]}"
152
- elsif options[:since_id]
153
- params = "?since_id=#{options[:since_id]}"
154
- else
155
- params = ""
156
- end
157
- if options[:page]
158
- if params == ""
159
- params = "?page=#{options[:page]}"
160
- else
161
- params = params + "&" + "page=#{options[:page]}"
162
- end
163
- end
164
- if res = request(query+params)
165
- data = JSON.parse(res)
166
- return data.map { |d| Status.new(d) }
167
- else
168
- return nil
169
- end
170
- end
171
-
172
- def get_client
173
- if res = request("http://twitter.com/users/show/#{@username}.json")
174
- return UserExtended.new(JSON.parse(res))
175
- else
176
- return nil
177
- end
178
- end
179
-
180
- def get_user(id)
181
- if res = request("http://twitter.com/users/show/#{id}.json")
182
- return UserExtended.new(JSON.parse(res))
183
- else
184
- return nil
185
- end
186
- end
187
-
188
- def get_status(id)
189
- if res = request("http://twitter.com/statuses/show/#{id}.json")
190
- return Status.new(JSON.parse(res))
191
- else
192
- return nil
193
- end
194
- end
195
-
196
- def rate_limit
197
- if res = request("http://twitter.com/account/rate_limit_status.json")
198
- return RateLimit.new(JSON.parse(res))
199
- else
200
- return nil
201
- end
202
- end
203
-
204
- def follows_me?(id)
205
- if res = request("http://twitter.com/friendships/exists.json?user_a=#{id}&user_b=#{@username}")
206
- return true if res == "true"
207
- return false
208
- else
209
- return nil
210
- end
211
- end
212
-
213
22
  private
214
-
215
23
  def request(url)
216
24
  http = nil
217
25
  status = Timeout::timeout(10) do
218
26
  log("request() query: #{url}")
219
- http = open(url, :http_basic_authentication=>[@username, @password])
27
+ http = open(url, :http_basic_authentication => [@username, @password])
220
28
  log("request() debug: http status is #{http.status.join(' ')}")
221
29
  if http.status == ["200", "OK"]
222
30
  res = http.read
@@ -236,21 +44,15 @@ module Tuiter
236
44
  end
237
45
 
238
46
  def parse_options(options)
239
- if options[:since]
240
- params = "?since=#{options[:since]}"
241
- elsif options[:since_id]
242
- params = "?since_id=#{options[:since_id]}"
243
- else
244
- params = ""
245
- end
47
+ params = ""
246
48
 
247
- if options[:page]
248
- if params == ""
249
- params = "?page=#{options[:page]}"
250
- else
251
- params = params + "&" + "page=#{options[:page]}"
49
+ options.each do |k, v|
50
+ unless params.empty?
51
+ params = params + "&#{k}=#{v}"
52
+ else
53
+ params = "?#{k}=#{v}"
252
54
  end
253
- end
55
+ end if (options && !options.empty?)
254
56
 
255
57
  return params
256
58
  end
@@ -0,0 +1,35 @@
1
+ # Account Methods
2
+ # [X] account/verify_credentials
3
+ # [ ] account/end_session
4
+ # [ ] account/update_location
5
+ # [ ] account/update_delivery_device
6
+ # [ ] account/update_profile_colors
7
+ # [ ] account/update_profile_image
8
+ # [ ] account/update_profile_background_image
9
+ # [X] account/rate_limit_status
10
+ # [ ] account/update_profile
11
+
12
+ module Tuiter
13
+
14
+ module AccountMethods
15
+
16
+ def account_verify_credentials?
17
+ if res = request("http://twitter.com/account/verify_credentials.json")
18
+ return Tuiter::UserExtended.new(JSON.parse(res))
19
+ else
20
+ return nil
21
+ end
22
+ end
23
+
24
+ def account_rate_limit_status
25
+ if res = request("http://twitter.com/account/rate_limit_status.json")
26
+ return Tuiter::RateLimit.new(JSON.parse(res))
27
+ else
28
+ return nil
29
+ end
30
+ end
31
+
32
+ end
33
+
34
+ end
35
+
@@ -0,0 +1,55 @@
1
+ # Direct Message Methods
2
+ # [X] direct_messages
3
+ # [ ] direct_messages/sent
4
+ # [X] direct_messages/new
5
+ # [ ] direct_messages/destroy
6
+
7
+ module Tuiter
8
+
9
+ module DirectMessageMethods
10
+
11
+ def direct_messages(options = {})
12
+ url = 'http://twitter.com/direct_messages.json'
13
+ params = parse_options(options) || ""
14
+
15
+ if res = request(url+params)
16
+ data = JSON.parse(res)
17
+ return data.map { |d| Tuiter::DirectMessage.new(d) }
18
+ else
19
+ return nil
20
+ end
21
+ end
22
+
23
+ def direct_messages_sent(options = {})
24
+ url = 'http://twitter.com/direct_messages/sent.json'
25
+ params = parse_options(options) || ""
26
+
27
+ if res = request(url+params)
28
+ data = JSON.parse(res)
29
+ return data.map { |d| Tuiter::DirectMessage.new(d) }
30
+ else
31
+ return nil
32
+ end
33
+ end
34
+
35
+ def direct_messages_new(user, text)
36
+ log("direct_new() sending: #{text} to #{user}")
37
+ url = URI.parse('http://twitter.com/direct_messages/new.json')
38
+ req = Net::HTTP::Post.new(url.path)
39
+ req.basic_auth @username, @password
40
+ req.set_form_data({'user'=>user, 'text'=>text })
41
+ res = new_http_for(url).start {|http| http.request(req) }
42
+ case res
43
+ when Net::HTTPSuccess, Net::HTTPRedirection
44
+ log("direct_new() success: OK")
45
+ return res # OK
46
+ else
47
+ log("direct_new() error: #{res.error!}")
48
+ res.error!
49
+ end
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+
@@ -0,0 +1,55 @@
1
+ # Friendship Methods
2
+ # [X] friendships/create
3
+ # [X] friendships/destroy
4
+ # [X] friendships/exists
5
+
6
+ module Tuiter
7
+
8
+ module FriendshipMethods
9
+
10
+ def friendships_create(user, follow = nil)
11
+ log("friendship_new() following: #{user}")
12
+ url = URI.parse("http://twitter.com/friendships/create/#{user}.json")
13
+ req = Net::HTTP::Post.new(url.path)
14
+ req.basic_auth @username, @password
15
+ req.set_form_data({'follow'=>"true"}) if follow
16
+ res = new_http_for(url).start {|http| http.request(req) }
17
+ case res
18
+ when Net::HTTPSuccess, Net::HTTPRedirection
19
+ log("friendship_new() success: OK")
20
+ return res # OK
21
+ else
22
+ log("friendship_new() error: #{res.error!}")
23
+ res.error!
24
+ end
25
+ end
26
+
27
+ def friendships_destroy(user, follow = nil)
28
+ log("friendship_new() following: #{user}")
29
+ url = URI.parse("http://twitter.com/friendships/destroy/#{user}.json")
30
+ req = Net::HTTP::Post.new(url.path)
31
+ req.basic_auth @username, @password
32
+ res = new_http_for(url).start {|http| http.request(req) }
33
+ case res
34
+ when Net::HTTPSuccess, Net::HTTPRedirection
35
+ log("remove_friendship() success: OK")
36
+ return res # OK
37
+ else
38
+ log("remove_friendship() error: #{res.error!}")
39
+ res.error!
40
+ end
41
+ end
42
+
43
+ def friendships_exists?(id)
44
+ if res = request("http://twitter.com/friendships/exists.json?user_a=#{id}&user_b=#{@username}")
45
+ return true if res == "true"
46
+ return false
47
+ else
48
+ return nil
49
+ end
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+
@@ -0,0 +1,20 @@
1
+ # Social Graph Methods
2
+ # [ ] friends/ids
3
+ # [X] followers/ids
4
+
5
+ module Tuiter
6
+
7
+ module SocialGraphMethods
8
+
9
+ def followers_ids
10
+ if res = request("http://twitter.com/followers/ids/#{username}.json")
11
+ return JSON.parse(res)
12
+ else
13
+ return nil
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ end
20
+
@@ -0,0 +1,66 @@
1
+ # Status Methods
2
+ # [ ] statuses/public_timeline
3
+ # [ ] statuses/friends_timeline
4
+ # [ ] statuses/user_timeline
5
+ # [X] statuses/show
6
+ # [X] statuses/update
7
+ # [X] statuses/mentions
8
+ # [ ] statuses/destroy
9
+
10
+ module Tuiter
11
+
12
+ module StatusMethods
13
+
14
+ def statuses_show(id)
15
+ if res = request("http://twitter.com/statuses/show/#{id}.json")
16
+ return Tuiter::Status.new(JSON.parse(res))
17
+ else
18
+ return nil
19
+ end
20
+ end
21
+
22
+ def statuses_update(status, in_reply_to_status_id = nil)
23
+ log("update() sending: #{status}")
24
+ url = URI.parse('http://twitter.com/statuses/update.json')
25
+ req = Net::HTTP::Post.new(url.path)
26
+ req.basic_auth @username, @password
27
+ req.set_form_data({'status'=>status, 'in_reply_to_status_id'=>in_reply_to_status_id })
28
+ res = new_http_for(url).start {|http| http.request(req) }
29
+ case res
30
+ when Net::HTTPSuccess, Net::HTTPRedirection
31
+ log("update() success: OK")
32
+ return res # OK
33
+ else
34
+ log("update() error: #{res.to_s}")
35
+ res.error!
36
+ end
37
+ end
38
+
39
+ def statuses_mentions(options = {})
40
+ query = "http://twitter.com/statuses/mentions.json"
41
+ if options[:since]
42
+ params = "?since=#{options[:since]}"
43
+ elsif options[:since_id]
44
+ params = "?since_id=#{options[:since_id]}"
45
+ else
46
+ params = ""
47
+ end
48
+ if options[:page]
49
+ if params == ""
50
+ params = "?page=#{options[:page]}"
51
+ else
52
+ params = params + "&" + "page=#{options[:page]}"
53
+ end
54
+ end
55
+ if res = request(query+params)
56
+ data = JSON.parse(res)
57
+ return data.map { |d| Tuiter::Status.new(d) }
58
+ else
59
+ return nil
60
+ end
61
+ end
62
+
63
+ end
64
+
65
+ end
66
+
@@ -0,0 +1,59 @@
1
+ # User Methods
2
+ # [X] statuses/friends
3
+ # [X] statuses/followers
4
+ # [X] users/show
5
+
6
+ module Tuiter
7
+
8
+ module UserMethods
9
+
10
+ def statuses_friends(options = {})
11
+ if options[:id]
12
+ query = "http://twitter.com/statuses/friends/#{options[:id]}.json"
13
+ else
14
+ query = "http://twitter.com/statuses/friends.json"
15
+ end
16
+ if options[:page]
17
+ params = "?page=#{options[:page]}"
18
+ else
19
+ params = ""
20
+ end
21
+ if res = request(query+params)
22
+ data = JSON.parse(res)
23
+ return data.map { |d| Tuiter::User.new(d) }
24
+ else
25
+ return nil
26
+ end
27
+ end
28
+
29
+ def statuses_followers(options = {})
30
+ if options[:id]
31
+ query = "http://twitter.com/statuses/followers/#{options[:id]}.json"
32
+ else
33
+ query = "http://twitter.com/statuses/followers.json"
34
+ end
35
+ if options[:page]
36
+ params = "?page=#{options[:page]}"
37
+ else
38
+ params = ""
39
+ end
40
+ if res = request(query+params)
41
+ data = JSON.parse(res)
42
+ return data.map { |d| Tuiter::User.new(d) }
43
+ else
44
+ return nil
45
+ end
46
+ end
47
+
48
+ def users_show(id)
49
+ if res = request("http://twitter.com/users/show/#{id}.json")
50
+ return Tuiter::UserExtended.new(JSON.parse(res))
51
+ else
52
+ return nil
53
+ end
54
+ end
55
+
56
+ end
57
+
58
+ end
59
+
@@ -7,7 +7,7 @@ unless defined? Tuiter::VERSION
7
7
  module VERSION
8
8
  MAJOR = 0
9
9
  MINOR = 0
10
- TINY = 4
10
+ TINY = 5
11
11
 
12
12
  STRING = [MAJOR, MINOR, TINY].join('.')
13
13
  end
data/test/test_helper.rb CHANGED
@@ -4,17 +4,6 @@ require "shoulda"
4
4
  require "mocha"
5
5
  require 'fakeweb'
6
6
 
7
- # begin
8
- # require "quietbacktrace"
9
- # Test::Unit::TestCase.quiet_backtrace = true
10
- # Test::Unit::TestCase.backtrace_silencers = [:test_unit, :gem_root, :e1]
11
- # Test::Unit::TestCase.backtrace_filters = [:method_name]
12
- # rescue LoadError
13
- # # Just ignore it
14
- # rescue NoMethodError
15
- # # Just ignore it
16
- # end
17
-
18
7
  require File.dirname(__FILE__) + "/../lib/tuiter"
19
8
 
20
9
  #Load shoulda macros
@@ -22,4 +11,6 @@ require File.dirname(__FILE__) + "/../lib/tuiter"
22
11
  Dir[File.dirname(__FILE__) + "/#{dirname}/*.rb"].each do |file|
23
12
  require file
24
13
  end
25
- end
14
+ end
15
+
16
+ Logger.any_instance.stubs(:info)
@@ -2,11 +2,11 @@ require File.dirname(__FILE__) + '/../test_helper'
2
2
 
3
3
  class ClientTest < Test::Unit::TestCase
4
4
 
5
- def self.fake_web_post_on_update(message = "Ok", http_response_status = 200)
6
- FakeWeb.register_uri(:post, "http://twitter.com/statuses/update.json", :string => message, :status => http_response_status.to_s)
5
+ def fake_web_on_post(url, options = {:string => "OK", :status => "200"})
6
+ FakeWeb.register_uri(:post, url, options)
7
7
  end
8
-
9
- context "A valid Tuiter client" do
8
+
9
+ context "A valid Tuiter client without proxy" do
10
10
 
11
11
  setup do
12
12
  @username = "username"
@@ -14,17 +14,14 @@ class ClientTest < Test::Unit::TestCase
14
14
  @client = Tuiter::Client.new(:username => @username, :password => @password)
15
15
  end
16
16
 
17
- context "posting data" do
17
+ context "on POST to statuses/update" do
18
18
  setup do
19
+ @update_message = "I'm fine"
19
20
  end
20
21
 
21
- context "successfully" do
22
-
22
+ context "with successfully response" do
23
23
  setup do
24
- @update_message = "I'm fine"
25
- FakeWeb.register_uri(:post, "http://twitter.com/statuses/update.json",
26
- :string => @update_message,
27
- :status => "200")
24
+ fake_web_on_post("http://twitter.com/statuses/update.json", :string => @update_message, :status => "200")
28
25
  end
29
26
 
30
27
  should "allow the user to post an update to Twitter" do
@@ -32,35 +29,63 @@ class ClientTest < Test::Unit::TestCase
32
29
  Net::HTTP::Post.any_instance.expects(:basic_auth).with(@username, @password)
33
30
  Net::HTTP::Post.any_instance.expects(:set_form_data).with('status' => @update_message, 'in_reply_to_status_id' => nil)
34
31
 
35
- @response = @client.update(@update_message)
36
-
32
+ assert_nothing_raised do
33
+ @response = @client.statuses_update(@update_message)
34
+ end
35
+ assert_instance_of Net::HTTPOK, @response
36
+ end
37
+
38
+ should "allow the user to post a reply to Twitter" do
39
+ # basic authentication and form data
40
+ Net::HTTP::Post.any_instance.expects(:basic_auth).with(@username, @password)
41
+ Net::HTTP::Post.any_instance.expects(:set_form_data).with('status' => @update_message, 'in_reply_to_status_id' => "1234567890")
42
+
43
+ assert_nothing_raised do
44
+ @response = @client.statuses_update(@update_message, "1234567890")
45
+ end
37
46
  assert_instance_of Net::HTTPOK, @response
38
47
  end
39
48
 
40
- end # context "successfully"
49
+ end # context "with successfully response"
41
50
 
42
- context "some error on request" do
51
+ context "with error response" do
43
52
  setup do
44
- @update_message = "I'm fine"
45
- FakeWeb.register_uri(:post, "http://twitter.com/statuses/update.json",
46
- :string => "503 Service unavailable",
47
- :status => ["503", "Service unavailable"])
53
+ response_status = ["503", "Service unavailable"]
54
+ fake_web_on_post("http://twitter.com/statuses/update.json", :string => response_status.join(" "), :status => response_status)
48
55
  end
49
56
 
50
57
  should "raise for http response status on 503" do
51
58
  Net::HTTP::Post.any_instance.expects(:basic_auth).with(@username, @password)
52
59
  Net::HTTP::Post.any_instance.expects(:set_form_data).with('status' => @update_message, 'in_reply_to_status_id' => nil)
60
+
53
61
  assert_raises Net::HTTPFatalError do
54
- @response = @client.update(@update_message)
62
+ @client.statuses_update(@update_message)
55
63
  end
56
- # assert_instance_of Net::HTTPServiceUnavailable, @response
57
64
  end
58
65
 
59
- end # context "some error on request"
66
+ end # context "with error response"
60
67
 
61
68
 
62
- end # context "posting data"
69
+ end # context "on POST to statuses/update"
70
+
71
+ context "on POST to direct_messages/new" do
72
+ setup do
73
+ fake_web_on_post("http://twitter.com/direct_messages/new.json")
74
+ @anoter_user = "1234567890"
75
+ @text = "Hello World!"
76
+ end
77
+
78
+ should "allow the user to post a direct message to another Twitter's user" do
79
+ Net::HTTP::Post.any_instance.expects(:basic_auth).with(@username, @password)
80
+ Net::HTTP::Post.any_instance.expects(:set_form_data).with('user'=>@another_user, 'text'=>@text )
81
+
82
+ assert_nothing_raised do
83
+ @response = @client.direct_messages_new(@another_user, @text)
84
+ end
85
+ assert_instance_of(Net::HTTPOK, @response)
86
+ end
87
+ end # context "on POST to direct_messages/new"
63
88
 
64
89
 
65
90
  end # context "A valid Tuiter client"
66
- end
91
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tuiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manoel Lemos
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-04-14 00:00:00 -03:00
13
+ date: 2009-04-24 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -44,9 +44,14 @@ files:
44
44
  - lib/tuiter/data/rate_limit.rb
45
45
  - lib/tuiter/data/status.rb
46
46
  - lib/tuiter/data/user.rb
47
- - lib/tuiter/end_points.rb
47
+ - lib/tuiter/methods
48
+ - lib/tuiter/methods/account.rb
49
+ - lib/tuiter/methods/direct_message.rb
50
+ - lib/tuiter/methods/friendship.rb
51
+ - lib/tuiter/methods/social_graph.rb
52
+ - lib/tuiter/methods/status.rb
53
+ - lib/tuiter/methods/user.rb
48
54
  - lib/tuiter/version.rb
49
- - lib/tuiter.log
50
55
  - lib/tuiter.rb
51
56
  - examples/basic_example.rb
52
57
  - test/fixtures
data/lib/tuiter.log DELETED
@@ -1,116 +0,0 @@
1
- # Logfile created on Sat Mar 21 16:21:26 -0300 2009 by /
2
- I, [2009-03-21T16:21:26.630191 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:21:26 -0300 2009 : initialize()
3
- I, [2009-03-21T16:21:54.173399 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:21:54 -0300 2009 : request() query: http://twitter.com/account/rate_limit_status.json
4
- I, [2009-03-21T16:21:55.040625 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:21:55 -0300 2009 : request() debug: http status is 200 OK
5
- I, [2009-03-21T16:25:50.347735 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:25:50 -0300 2009 : request() query: http://twitter.com/statuses/show/lsdr.json
6
- I, [2009-03-21T16:25:50.818158 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:25:50 -0300 2009 : request() http error: 404 Not Found in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:278:in `open_http'
7
- I, [2009-03-21T16:25:57.859336 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:25:57 -0300 2009 : request() query: http://twitter.com/statuses/show/34751.json
8
- I, [2009-03-21T16:25:58.344673 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:25:58 -0300 2009 : request() debug: http status is 200 OK
9
- I, [2009-03-21T16:26:18.827014 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:26:18 -0300 2009 : request() query: http://twitter.com/users/show/lucasfais.json
10
- I, [2009-03-21T16:26:19.573533 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:26:19 -0300 2009 : request() debug: http status is 200 OK
11
- I, [2009-03-21T16:26:28.962982 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:26:28 -0300 2009 : request() query: http://twitter.com/users/show/jacktorrance.json
12
- I, [2009-03-21T16:26:29.498437 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:26:29 -0300 2009 : request() debug: http status is 200 OK
13
- I, [2009-03-21T16:30:43.347043 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:30:43 -0300 2009 : request() query: http://twitter.com/statuses/followers.json
14
- I, [2009-03-21T16:30:43.862539 #2112] INFO -- : [Tuiter:2112] Sat Mar 21 16:30:43 -0300 2009 : request() debug: http status is 200 OK
15
- I, [2009-03-21T20:08:51.185245 #2265] INFO -- : [Tuiter:2265] Sat Mar 21 20:08:51 -0300 2009 : initialize()
16
- I, [2009-03-21T20:08:54.287965 #2265] INFO -- : [Tuiter:2265] Sat Mar 21 20:08:54 -0300 2009 : request() query: http://twitter.com/users/show/jacktorrance.json
17
- I, [2009-03-21T20:09:09.302025 #2265] INFO -- : [Tuiter:2265] Sat Mar 21 20:09:09 -0300 2009 : request() error: timeout error
18
- I, [2009-03-21T20:09:46.075840 #2265] INFO -- : [Tuiter:2265] Sat Mar 21 20:09:46 -0300 2009 : request() query: http://twitter.com/statuses/show/34751.json
19
- I, [2009-03-21T20:10:01.095919 #2265] INFO -- : [Tuiter:2265] Sat Mar 21 20:10:01 -0300 2009 : request() error: timeout error
20
- I, [2009-03-21T20:10:15.372542 #2457] INFO -- : [Tuiter:2457] Sat Mar 21 20:10:15 -0300 2009 : initialize()
21
- I, [2009-03-21T20:10:22.107576 #2457] INFO -- : [Tuiter:2457] Sat Mar 21 20:10:22 -0300 2009 : request() query: http://twitter.com/account/rate_limit_status.json
22
- I, [2009-03-21T20:10:22.771328 #2457] INFO -- : [Tuiter:2457] Sat Mar 21 20:10:22 -0300 2009 : request() debug: http status is 200 OK
23
- I, [2009-03-21T20:11:40.731980 #2457] INFO -- : [Tuiter:2457] Sat Mar 21 20:11:40 -0300 2009 : update() sending: #<Tuiter::Status:0x57f710>
24
- I, [2009-03-21T20:11:56.729236 #2457] INFO -- : [Tuiter:2457] Sat Mar 21 20:11:56 -0300 2009 : update() success: OK
25
- I, [2009-04-03T08:53:43.427986 #4321] INFO -- : [Tuiter:4321] Fri Apr 03 08:53:43 -0300 2009 : initialize()
26
- I, [2009-04-03T09:10:50.463761 #4321] INFO -- : [Tuiter:4321] Fri Apr 03 09:10:50 -0300 2009 : request() query: http://twitter.com/account/rate_limit_status.json
27
- I, [2009-04-03T09:10:51.298101 #4321] INFO -- : [Tuiter:4321] Fri Apr 03 09:10:51 -0300 2009 : request() debug: http status is 200 OK
28
- I, [2009-04-03T10:02:23.578571 #8903] INFO -- : [Tuiter:8903] Fri Apr 03 10:02:23 -0300 2009 : initialize()
29
- I, [2009-04-03T10:02:28.009525 #8903] INFO -- : [Tuiter:8903] Fri Apr 03 10:02:28 -0300 2009 : request() query: http://twitter.com/direct_messages.json
30
- I, [2009-04-03T10:02:31.793239 #8903] INFO -- : [Tuiter:8903] Fri Apr 03 10:02:31 -0300 2009 : request() debug: http status is 200 OK
31
- I, [2009-04-04T10:46:52.065881 #652] INFO -- : [Tuiter:652] Sat Apr 04 10:46:52 -0300 2009 : initialize()
32
- I, [2009-04-04T10:46:56.967758 #652] INFO -- : [Tuiter:652] Sat Apr 04 10:46:56 -0300 2009 : request() query: http://twitter.com/account/rate_limit_status.json
33
- I, [2009-04-04T10:46:57.442538 #652] INFO -- : [Tuiter:652] Sat Apr 04 10:46:57 -0300 2009 : request() debug: http status is 200 OK
34
- I, [2009-04-04T10:48:17.721315 #720] INFO -- : [Tuiter:720] Sat Apr 04 10:48:17 -0300 2009 : initialize()
35
- I, [2009-04-04T10:48:21.166143 #720] INFO -- : [Tuiter:720] Sat Apr 04 10:48:21 -0300 2009 : request() query: http://twitter.com/account/rate_limit_status.json
36
- I, [2009-04-04T10:48:21.765680 #720] INFO -- : [Tuiter:720] Sat Apr 04 10:48:21 -0300 2009 : request() debug: http status is 200 OK
37
- I, [2009-04-04T10:48:33.733567 #720] INFO -- : [Tuiter:720] Sat Apr 04 10:48:33 -0300 2009 : request() query: http://twitter.com/direct_messages.json
38
- I, [2009-04-04T10:48:34.636358 #720] INFO -- : [Tuiter:720] Sat Apr 04 10:48:34 -0300 2009 : request() debug: http status is 200 OK
39
- I, [2009-04-04T10:59:19.665326 #652] INFO -- : [Tuiter:652] Sat Apr 04 10:59:19 -0300 2009 : request() query: http://twitter.com/direct_messages.json
40
- I, [2009-04-04T10:59:20.229616 #652] INFO -- : [Tuiter:652] Sat Apr 04 10:59:20 -0300 2009 : request() debug: http status is 200 OK
41
- I, [2009-04-04T11:06:28.427837 #652] INFO -- : [Tuiter:652] Sat Apr 04 11:06:28 -0300 2009 : request() query: http://twitter.com/direct_messages.json
42
- I, [2009-04-04T11:06:29.077480 #652] INFO -- : [Tuiter:652] Sat Apr 04 11:06:29 -0300 2009 : request() debug: http status is 200 OK
43
- I, [2009-04-04T11:06:51.125856 #754] INFO -- : [Tuiter:754] Sat Apr 04 11:06:51 -0300 2009 : initialize()
44
- I, [2009-04-04T11:06:54.684243 #754] INFO -- : [Tuiter:754] Sat Apr 04 11:06:54 -0300 2009 : request() query: http://twitter.com/direct_messages.json
45
- I, [2009-04-04T11:06:55.296060 #754] INFO -- : [Tuiter:754] Sat Apr 04 11:06:55 -0300 2009 : request() debug: http status is 200 OK
46
- I, [2009-04-04T11:08:29.059308 #766] INFO -- : [Tuiter:766] Sat Apr 04 11:08:29 -0300 2009 : initialize()
47
- I, [2009-04-04T11:08:32.425009 #766] INFO -- : [Tuiter:766] Sat Apr 04 11:08:32 -0300 2009 : request() query: http://twitter.com/direct_messages.json
48
- I, [2009-04-04T11:08:33.088710 #766] INFO -- : [Tuiter:766] Sat Apr 04 11:08:33 -0300 2009 : request() debug: http status is 200 OK
49
- I, [2009-04-04T11:10:22.162594 #777] INFO -- : [Tuiter:777] Sat Apr 04 11:10:22 -0300 2009 : initialize()
50
- I, [2009-04-04T11:10:24.984837 #777] INFO -- : [Tuiter:777] Sat Apr 04 11:10:24 -0300 2009 : request() query: http://twitter.com/direct_messages.json
51
- I, [2009-04-04T11:10:25.459088 #777] INFO -- : [Tuiter:777] Sat Apr 04 11:10:25 -0300 2009 : request() debug: http status is 200 OK
52
- I, [2009-04-04T11:10:33.344786 #777] INFO -- : [Tuiter:777] Sat Apr 04 11:10:33 -0300 2009 : request() query: http://twitter.com/direct_messages.json
53
- I, [2009-04-04T11:10:33.954567 #777] INFO -- : [Tuiter:777] Sat Apr 04 11:10:33 -0300 2009 : request() debug: http status is 200 OK
54
- I, [2009-04-04T11:13:45.335715 #789] INFO -- : [Tuiter:789] Sat Apr 04 11:13:45 -0300 2009 : initialize()
55
- I, [2009-04-04T11:13:50.022233 #789] INFO -- : [Tuiter:789] Sat Apr 04 11:13:50 -0300 2009 : request() query: http://twitter.com/direct_messages.json
56
- I, [2009-04-04T11:13:51.264725 #789] INFO -- : [Tuiter:789] Sat Apr 04 11:13:51 -0300 2009 : request() debug: http status is 200 OK
57
- I, [2009-04-04T11:13:57.622508 #789] INFO -- : [Tuiter:789] Sat Apr 04 11:13:57 -0300 2009 : request() query: http://twitter.com/direct_messages.json
58
- I, [2009-04-04T11:13:58.246439 #789] INFO -- : [Tuiter:789] Sat Apr 04 11:13:58 -0300 2009 : request() debug: http status is 200 OK
59
- I, [2009-04-04T11:22:32.286894 #817] INFO -- : [Tuiter:817] Sat Apr 04 11:22:32 -0300 2009 : initialize()
60
- I, [2009-04-04T11:22:42.397339 #817] INFO -- : [Tuiter:817] Sat Apr 04 11:22:42 -0300 2009 : request() query: http://twitter.com/direct_messages.json
61
- I, [2009-04-04T11:22:43.736985 #817] INFO -- : [Tuiter:817] Sat Apr 04 11:22:43 -0300 2009 : request() debug: http status is 200 OK
62
- I, [2009-04-04T11:24:51.155070 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:24:51 -0300 2009 : initialize()
63
- I, [2009-04-04T11:27:05.763596 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:27:05 -0300 2009 : request() query: http://twitter.com/direct_messages.json
64
- I, [2009-04-04T11:27:06.886668 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:27:06 -0300 2009 : request() debug: http status is 200 OK
65
- I, [2009-04-04T11:27:16.028439 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:27:16 -0300 2009 : request() query: http://twitter.com/direct_messages.json
66
- I, [2009-04-04T11:27:16.798857 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:27:16 -0300 2009 : request() debug: http status is 200 OK
67
- I, [2009-04-04T11:27:32.333157 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:27:32 -0300 2009 : request() query: http://twitter.com/direct_messages.json?page=2
68
- I, [2009-04-04T11:27:33.356890 #877] INFO -- : [Tuiter:877] Sat Apr 04 11:27:33 -0300 2009 : request() debug: http status is 200 OK
69
- I, [2009-04-05T20:41:37.553400 #2715] INFO -- : [Tuiter:2715] Sun Apr 05 20:41:37 -0300 2009 : initialize()
70
- I, [2009-04-05T20:41:44.512426 #2715] INFO -- : [Tuiter:2715] Sun Apr 05 20:41:44 -0300 2009 : request() query: http://twitter.com/followers/ids/el_cocho.json
71
- I, [2009-04-05T20:41:44.995093 #2715] INFO -- : [Tuiter:2715] Sun Apr 05 20:41:44 -0300 2009 : request() debug: http status is 200 OK
72
- I, [2009-04-14T17:29:43.673209 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:29:43 -0300 2009 : initialize()
73
- I, [2009-04-14T17:30:14.177041 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:14 -0300 2009 : initialize()
74
- I, [2009-04-14T17:30:49.449220 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:49 -0300 2009 : request() query: http://twitter.com/friendships/exists.json?user_a=jacktorrance&user_b=el_cocho
75
- I, [2009-04-14T17:30:50.093362 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:50 -0300 2009 : request() debug: http status is 200 OK
76
- I, [2009-04-14T17:30:55.416097 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:55 -0300 2009 : request() query: http://twitter.com/friendships/exists.json?user_a=jacktorran&user_b=el_cocho
77
- I, [2009-04-14T17:30:57.054399 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:57 -0300 2009 : request() http error: 403 Forbidden in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:278:in `open_http'
78
- I, [2009-04-14T17:30:58.953377 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:58 -0300 2009 : request() query: http://twitter.com/friendships/exists.json?user_a=jacktorrance&user_b=el_cocho
79
- I, [2009-04-14T17:30:59.436056 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:30:59 -0300 2009 : request() debug: http status is 200 OK
80
- I, [2009-04-14T17:31:11.345039 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:31:11 -0300 2009 : request() query: http://twitter.com/friendships/exists.json?user_a=jacktorrance&user_b=el_cocho
81
- I, [2009-04-14T17:31:13.529470 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:31:13 -0300 2009 : request() debug: http status is 200 OK
82
- I, [2009-04-14T17:31:22.881538 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:31:22 -0300 2009 : request() query: http://twitter.com/friendships/exists.json?user_a=el_cocho&user_b=jacktorrance
83
- I, [2009-04-14T17:31:23.414882 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:31:23 -0300 2009 : request() debug: http status is 200 OK
84
- I, [2009-04-14T17:33:57.281787 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:33:57 -0300 2009 : friendship_new() following: 8405350
85
- I, [2009-04-14T17:35:44.743006 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:35:44 -0300 2009 : friendship_new() following: el_cocho
86
- I, [2009-04-14T17:35:45.739301 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:35:45 -0300 2009 : friendship_new() success: OK
87
- I, [2009-04-14T17:37:58.969786 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:37:58 -0300 2009 : update() sending: una loucuja es una loucuja
88
- I, [2009-04-14T17:38:00.575303 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:38:00 -0300 2009 : update() success: OK
89
- I, [2009-04-14T17:38:25.434711 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:38:25 -0300 2009 : update() sending: txelci 4 x liverpoul 4
90
- I, [2009-04-14T17:38:26.858112 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:38:26 -0300 2009 : update() success: OK
91
- I, [2009-04-14T17:40:24.503832 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:40:24 -0300 2009 : friendship_new() following: jacktorrance
92
- I, [2009-04-14T17:40:25.489296 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:40:25 -0300 2009 : friendship_new() success: OK
93
- I, [2009-04-14T17:41:05.943669 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:05 -0300 2009 : update() sending: all work and no play makes jack a dull bot
94
- I, [2009-04-14T17:41:07.368539 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:07 -0300 2009 : update() success: OK
95
- I, [2009-04-14T17:41:07.368652 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:07 -0300 2009 : update() sending: all work and no play makes jack a dull bot
96
- I, [2009-04-14T17:41:08.125190 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:08 -0300 2009 : update() success: OK
97
- I, [2009-04-14T17:41:08.125270 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:08 -0300 2009 : update() sending: all work and no play makes jack a dull bot
98
- I, [2009-04-14T17:41:08.842099 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:08 -0300 2009 : update() success: OK
99
- I, [2009-04-14T17:41:08.842202 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:08 -0300 2009 : update() sending: all work and no play makes jack a dull bot
100
- I, [2009-04-14T17:41:09.840732 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:09 -0300 2009 : update() success: OK
101
- I, [2009-04-14T17:41:09.840915 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:09 -0300 2009 : update() sending: all work and no play makes jack a dull bot
102
- I, [2009-04-14T17:41:10.827714 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:10 -0300 2009 : update() success: OK
103
- I, [2009-04-14T17:41:10.827843 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:10 -0300 2009 : update() sending: all work and no play makes jack a dull bot
104
- I, [2009-04-14T17:41:11.520762 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:11 -0300 2009 : update() success: OK
105
- I, [2009-04-14T17:41:11.520945 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:11 -0300 2009 : update() sending: all work and no play makes jack a dull bot
106
- I, [2009-04-14T17:41:12.803576 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:12 -0300 2009 : update() success: OK
107
- I, [2009-04-14T17:41:12.803678 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:12 -0300 2009 : update() sending: all work and no play makes jack a dull bot
108
- I, [2009-04-14T17:41:13.521870 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:13 -0300 2009 : update() success: OK
109
- I, [2009-04-14T17:41:13.521949 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:13 -0300 2009 : update() sending: all work and no play makes jack a dull bot
110
- I, [2009-04-14T17:41:15.314131 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:15 -0300 2009 : update() success: OK
111
- I, [2009-04-14T17:41:15.314258 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:15 -0300 2009 : update() sending: all work and no play makes jack a dull bot
112
- I, [2009-04-14T17:41:16.017922 #42602] INFO -- : [Tuiter:42602] Tue Apr 14 17:41:16 -0300 2009 : update() success: OK
113
- I, [2009-04-14T17:43:06.041230 #43489] INFO -- : [Tuiter:43489] Tue Apr 14 17:43:06 -0300 2009 : initialize()
114
- I, [2009-04-14T20:56:00.218333 #56199] INFO -- : [Tuiter:56199] Tue Apr 14 20:56:00 -0300 2009 : initialize()
115
- I, [2009-04-14T20:57:05.965585 #56199] INFO -- : [Tuiter:56199] Tue Apr 14 20:57:05 -0300 2009 : friendship_new() following: el_cocho
116
- I, [2009-04-14T20:57:06.640700 #56199] INFO -- : [Tuiter:56199] Tue Apr 14 20:57:06 -0300 2009 : remove_friendship() success: OK
@@ -1,9 +0,0 @@
1
- module Tuiter
2
-
3
- DIRECT_MESSAGES = { :list => 'http://twitter.com/direct_messages',
4
- :sent => 'http://twitter.com/direct_messages/sent',
5
- :new => 'http://twitter.com/direct_messages/new',
6
- :destroy => "http://twitter.com/direct_messages/destroy/#{id}" }
7
-
8
- end
9
-