3 :info => '/account/update_profile',
4 :colors => '/account/update_profile_colors',
5 :device => '/account/update_delivery_device',
8 # Provides access to the Twitter Profile API.
10 # You can update profile information. You can update the types of profile
12 # * :info (name, email, url, location, description)
13 # * :colors (background_color, text_color, link_color, sidebar_fill_color,
14 # sidebar_border_color)
15 # * :device (set device to either "sms", "im" or "none")
18 # user = client.profile(:info, :location => "University Library")
20 def profile(action, attributes)
21 connection = create_http_connection
22 connection.start do |connection|
23 response = http_connect(attributes.to_http_str) do |conn|
24 create_http_post_request(@@PROFILE_URIS[action])
26 bless_models(Twitter::User.unmarshal(response.body))