Method: Twitter::REST::Users#settings
- Defined in:
- lib/twitter/rest/users.rb
#settings(options = {}) ⇒ Twitter::Settings
Updates the authenticating user's settings. Or, if no options supplied, returns settings (including current trend, geo and sleep time information) for the authenticating user.
35 36 37 38 39 40 41 |
# File 'lib/twitter/rest/users.rb', line 35 def settings( = {}) request_method = .empty? ? :get : :post response = perform_request(request_method.to_sym, "/1.1/account/settings.json", ) # https://dev.twitter.com/issues/59 response[:trend_location] = response.fetch(:trend_location, []).first Twitter::Settings.new(response) end |