moomerman-twitter_oauth 0.1.20 → 0.1.21

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.
@@ -28,11 +28,6 @@ module TwitterOAuth
28
28
  @secret = @access_token.secret
29
29
  @access_token
30
30
  end
31
-
32
- def authentication_request_token
33
- consumer.options[:authorize_path] = '/oauth/authenticate'
34
- request_token
35
- end
36
31
 
37
32
  def show(username)
38
33
  oauth_response = access_token.get("/users/show/#{username}.json")
@@ -43,6 +38,11 @@ module TwitterOAuth
43
38
  consumer.get_request_token(options)
44
39
  end
45
40
 
41
+ def authentication_request_token(options={})
42
+ consumer.options[:authorize_path] = '/oauth/authenticate'
43
+ request_token(options)
44
+ end
45
+
46
46
  private
47
47
  def consumer
48
48
  @consumer ||= OAuth::Consumer.new(
@@ -4,8 +4,10 @@ require 'ostruct'
4
4
  module TwitterOAuth
5
5
  class Client
6
6
 
7
- def search(q, page = 1, per_page = 20)
8
- response = open("http://search.twitter.com/search.json?q=#{URI.escape(q)}&page=#{page}&rpp=#{per_page}")
7
+ def search(q, options={})
8
+ options[:page] ||= 1
9
+ options[:per_page] ||= 20
10
+ response = open("http://search.twitter.com/search.json?q=#{URI.escape(q)}&page=#{options[:page]}&rpp=#{options[:per_page]}&since_id=#{options[:since_id]}")
9
11
  search_result = JSON.parse(response.read)
10
12
  search_result = OpenStruct.new(search_result)
11
13
  search_result.results = search_result.results.collect{|x| OpenStruct.new(x)}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moomerman-twitter_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor
@@ -67,6 +67,7 @@ files:
67
67
  - lib/twitter_oauth/utils.rb
68
68
  has_rdoc: false
69
69
  homepage: http://github.com/moomerman/twitter_oauth
70
+ licenses:
70
71
  post_install_message:
71
72
  rdoc_options:
72
73
  - --inline-source
@@ -88,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
89
  requirements: []
89
90
 
90
91
  rubyforge_project: twitter_oauth
91
- rubygems_version: 1.2.0
92
+ rubygems_version: 1.3.5
92
93
  signing_key:
93
94
  specification_version: 2
94
95
  summary: twitter_oauth is a Ruby library for talking to twitter using the new oauth method.