Sha256: d18d9d88151a7d2326a08d57f84941350efe9258904d617c86bcbafe05ed30cb

Contents?: true

Size: 842 Bytes

Versions: 6

Compression:

Stored size: 842 Bytes

Contents

class Twitter::Client
  @@PROFILE_URIS = {
    :info => '/account/update_profile',
    :colors => '/account/update_profile_colors',
    :device => '/account/update_delivery_device',
  }
  
  # Provides access to the Twitter Profile API.
  # 
  # You can update profile information.  You can update the types of profile 
  # information:
  # * :info (name, email, url, location, description)
  # * :colors (background_color, text_color, link_color, sidebar_fill_color, 
  # sidebar_border_color)
  # * :device (set device to either "sms", "im" or "none")
  # 
  # Example:
  #  user = client.profile(:info, :location => "University Library")
  #  puts user.inspect
  def profile(action, attributes)
    response = rest_oauth_connect(:post, @@PROFILE_URIS[action], attributes)
    bless_models(Twitter::User.unmarshal(response.body))
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
twitter4r-0.7.0 lib/twitter/client/profile.rb
twitter4r-0.6.0 lib/twitter/client/profile.rb
twitter4r-0.5.3 lib/twitter/client/profile.rb
twitter4r-0.5.2 lib/twitter/client/profile.rb
twitter4r-0.5.1 lib/twitter/client/profile.rb
twitter4r-0.5.0 lib/twitter/client/profile.rb