Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed authorized? path, thanks to @paulvictor

  • Loading branch information...
commit 1928917622443eacbafe461b05faed3ec0a24861 1 parent 7262821
@moomerman authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 lib/twitter_oauth/account.rb
View
22 lib/twitter_oauth/account.rb
@@ -1,43 +1,43 @@
module TwitterOAuth
class Client
-
- # Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful;
+
+ # Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful;
# returns a 401 status code and an error message if not.
def authorized?
- oauth_response = access_token.get('/account/verify_credentials.json')
+ oauth_response = access_token.get('/1/account/verify_credentials.json')
return oauth_response.class == Net::HTTPOK
end
-
+
# Returns client info
def info
get('/account/verify_credentials.json')
end
-
+
# Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.
def rate_limit_status
get('/account/rate_limit_status.json')
end
-
+
# Updates profile background image. Takes a File object and optional tile argument.
# Returns extended user info object.
def update_profile_background_image(image, tile = false)
body, headers = http_multipart_data({:image => image, :tile => tile})
post('/account/update_profile_background_image.json', body, headers)
end
-
+
# Updates profile avatar image. Takes a File object which should be an image.
# Returns extended user info object.
def update_profile_image(image)
body, headers = http_multipart_data({:image => image})
post('/account/update_profile_image.json', body, headers)
end
-
- # 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
+
+ # 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
# returns extended user info object.
def update_profile_colors(colors)
post('/account/update_profile_colors.json', colors)
end
-
+
# Sets values that users are able to set under the "Account" tab of their settings page.
# Valid parameters are:
# :name Full name associated with the profile. Maximum of 20 characters.
@@ -48,6 +48,6 @@ def update_profile_colors(colors)
def update_profile(params)
post('/account/update_profile', params)
end
-
+
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.