rubytter 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/examples/use_oauth.rb +25 -0
- data/lib/rubytter.rb +0 -6
- data/spec/rubytter_spec.rb +0 -1
- metadata +3 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -0,0 +1,25 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), '../lib')
|
2
|
+
require 'rubygems'
|
3
|
+
require 'rubytter'
|
4
|
+
require 'oauth'
|
5
|
+
|
6
|
+
key = ""
|
7
|
+
secret = ""
|
8
|
+
|
9
|
+
consumer = OAuth::Consumer.new(key, secret, :site => "http://twitter.com")
|
10
|
+
|
11
|
+
request_token = consumer.get_request_token
|
12
|
+
system('open', request_token.authorize_url) || puts("Access here: #{request_token.authorize_url}\nand...")
|
13
|
+
|
14
|
+
print "Enter PIN: "
|
15
|
+
pin = gets.strip
|
16
|
+
|
17
|
+
access_token = request_token.get_access_token(
|
18
|
+
:oauth_token => request_token.token,
|
19
|
+
:oauth_verifier => pin
|
20
|
+
)
|
21
|
+
|
22
|
+
client = OAuthRubytter.new(access_token)
|
23
|
+
client.friends_timeline.each do |status|
|
24
|
+
puts "#{status.user.screen_name}: #{status.text}"
|
25
|
+
end
|
data/lib/rubytter.rb
CHANGED
data/spec/rubytter_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubytter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jugyo
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- examples/replies.rb
|
56
56
|
- examples/search.rb
|
57
57
|
- examples/update_status.rb
|
58
|
+
- examples/use_oauth.rb
|
58
59
|
- examples/user.rb
|
59
60
|
- lib/rubytter.rb
|
60
61
|
- lib/rubytter/connection.rb
|
@@ -104,4 +105,5 @@ test_files:
|
|
104
105
|
- examples/replies.rb
|
105
106
|
- examples/search.rb
|
106
107
|
- examples/update_status.rb
|
108
|
+
- examples/use_oauth.rb
|
107
109
|
- examples/user.rb
|