diff --git a/lib/twitter/client/account.rb b/lib/twitter/client/account.rb index 4ccfb4a08..d4766b5a4 100644 --- a/lib/twitter/client/account.rb +++ b/lib/twitter/client/account.rb @@ -138,19 +138,6 @@ def update_profile(options={}) Twitter::User.new(user) end - # Returns the current count of friends, followers, updates (statuses) and favorites of the authenticating user. - # - # @see https://dev.twitter.com/docs/api/1/get/account/totals - # @rate_limited Yes - # @requires_authentication Yes - # @return [Hash] the current count of friends, followers, updates, and favorites of the authenticating user. - # @raise [Twitter::Unauthorized] Error raised when supplied user credentials are not valid. - # @example Return the totals for the authenticating user. - # Twitter.totals - def totals(options={}) - get("/1/account/totals.json", options) - end - # 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. # diff --git a/lib/twitter/user.rb b/lib/twitter/user.rb index a6e4b325f..a7a693d8b 100644 --- a/lib/twitter/user.rb +++ b/lib/twitter/user.rb @@ -23,14 +23,22 @@ class User < Twitter::Base alias :default_profile_image? :default_profile_image alias :follow_request_sent? :follow_request_sent alias :following? :following + alias :favorites :favourites_count + alias :favorites_count :favourites_count + alias :favourites :favourites_count + alias :followers :followers_count + alias :friends :friends_count alias :geo_enabled? :geo_enabled alias :is_translator? :is_translator + alias :listed :listed_count alias :notifications? :notifications alias :profile_background_tile? :profile_background_tile alias :profile_use_background_image? :profile_use_background_image alias :protected? :protected + alias :statuses :statuses_count alias :translator :is_translator alias :translator? :is_translator + alias :updates :statuses_count alias :verified? :verified def initialize(user={}) diff --git a/spec/twitter/client/account_spec.rb b/spec/twitter/client/account_spec.rb index 01da2a917..2ee0fa01a 100644 --- a/spec/twitter/client/account_spec.rb +++ b/spec/twitter/client/account_spec.rb @@ -177,27 +177,6 @@ end end - describe ".totals" do - - before do - stub_get("/1/account/totals.json"). - to_return(:body => fixture("totals.json"), :headers => {:content_type => "application/json; charset=utf-8"}) - end - - it "should get the correct resource" do - @client.totals - a_get("/1/account/totals.json"). - should have_been_made - end - - it "should return a hash" do - totals = @client.totals - totals.should be_a Hash - totals['favorites'].should == 2811 - end - - end - describe ".settings" do before do