twitter_oauth 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/twitter_oauth.rb CHANGED
@@ -5,5 +5,5 @@ require 'mime/types'
5
5
  require 'twitter_oauth/client'
6
6
 
7
7
  module TwitterOAuth
8
- VERSION = '0.4.3'
8
+ VERSION = '0.4.4'
9
9
  end
@@ -1,43 +1,43 @@
1
1
  module TwitterOAuth
2
2
  class Client
3
-
4
- # Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful;
3
+
4
+ # Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful;
5
5
  # returns a 401 status code and an error message if not.
6
6
  def authorized?
7
- oauth_response = access_token.get('/account/verify_credentials.json')
7
+ oauth_response = access_token.get('/1/account/verify_credentials.json')
8
8
  return oauth_response.class == Net::HTTPOK
9
9
  end
10
-
10
+
11
11
  # Returns client info
12
12
  def info
13
13
  get('/account/verify_credentials.json')
14
14
  end
15
-
15
+
16
16
  # Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.
17
17
  def rate_limit_status
18
18
  get('/account/rate_limit_status.json')
19
19
  end
20
-
20
+
21
21
  # Updates profile background image. Takes a File object and optional tile argument.
22
22
  # Returns extended user info object.
23
23
  def update_profile_background_image(image, tile = false)
24
24
  body, headers = http_multipart_data({:image => image, :tile => tile})
25
25
  post('/account/update_profile_background_image.json', body, headers)
26
26
  end
27
-
27
+
28
28
  # Updates profile avatar image. Takes a File object which should be an image.
29
29
  # Returns extended user info object.
30
30
  def update_profile_image(image)
31
31
  body, headers = http_multipart_data({:image => image})
32
32
  post('/account/update_profile_image.json', body, headers)
33
33
  end
34
-
35
- # colors hash must contain at least one or more of the following keys :profile_background_color, :profile_text_color, :profile_link_color, :profile_sidebar_fill_color, :profile_sidebar_border_color
34
+
35
+ # colors hash must contain at least one or more of the following keys :profile_background_color, :profile_text_color, :profile_link_color, :profile_sidebar_fill_color, :profile_sidebar_border_color
36
36
  # returns extended user info object.
37
37
  def update_profile_colors(colors)
38
38
  post('/account/update_profile_colors.json', colors)
39
39
  end
40
-
40
+
41
41
  # Sets values that users are able to set under the "Account" tab of their settings page.
42
42
  # Valid parameters are:
43
43
  # :name Full name associated with the profile. Maximum of 20 characters.
@@ -48,6 +48,6 @@ module TwitterOAuth
48
48
  def update_profile(params)
49
49
  post('/account/update_profile', params)
50
50
  end
51
-
51
+
52
52
  end
53
53
  end
metadata CHANGED
@@ -1,76 +1,102 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: twitter_oauth
3
- version: !ruby/object:Gem::Version
4
- version: 0.4.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.4
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Richard Taylor
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2010-08-11 00:00:00 +01:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: oauth
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.4.1
17
22
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
23
29
  version: 0.4.1
24
- version:
25
- - !ruby/object:Gem::Dependency
30
+ - !ruby/object:Gem::Dependency
26
31
  name: json
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 1.1.9
27
38
  type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
33
45
  version: 1.1.9
34
- version:
35
- - !ruby/object:Gem::Dependency
46
+ - !ruby/object:Gem::Dependency
36
47
  name: mime-types
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '1.16'
37
54
  type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: "1.16"
44
- version:
45
- - !ruby/object:Gem::Dependency
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '1.16'
62
+ - !ruby/object:Gem::Dependency
46
63
  name: shoulda
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
47
70
  type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: "0"
54
- version:
55
- - !ruby/object:Gem::Dependency
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
56
79
  name: mocha
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
57
86
  type: :development
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: "0"
64
- version:
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
65
94
  description: twitter_oauth is a Ruby client for the Twitter API using OAuth.
66
95
  email: moomerman@gmail.com
67
96
  executables: []
68
-
69
97
  extensions: []
70
-
71
98
  extra_rdoc_files: []
72
-
73
- files:
99
+ files:
74
100
  - LICENSE
75
101
  - README.textile
76
102
  - lib/twitter_oauth.rb
@@ -91,34 +117,30 @@ files:
91
117
  - lib/twitter_oauth/trends.rb
92
118
  - lib/twitter_oauth/user.rb
93
119
  - lib/twitter_oauth/utils.rb
94
- has_rdoc: true
95
120
  homepage: http://github.com/moomerman/twitter_oauth
96
121
  licenses: []
97
-
98
122
  post_install_message:
99
- rdoc_options:
123
+ rdoc_options:
100
124
  - --inline-source
101
125
  - --charset=UTF-8
102
- require_paths:
126
+ require_paths:
103
127
  - lib
104
- required_ruby_version: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: "0"
109
- version:
110
- required_rubygems_version: !ruby/object:Gem::Requirement
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: "0"
115
- version:
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ none: false
136
+ requirements:
137
+ - - ! '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
116
140
  requirements: []
117
-
118
141
  rubyforge_project: twitter_oauth
119
- rubygems_version: 1.3.5
142
+ rubygems_version: 1.8.24
120
143
  signing_key:
121
144
  specification_version: 2
122
145
  summary: twitter_oauth is a Ruby client for the Twitter API using OAuth.
123
146
  test_files: []
124
-