Sha256: 7c23e4915b006e1cfdd437f6c7c52092758e8228f4f1846fd64787eea9b638b4

Contents?: true

Size: 800 Bytes

Versions: 10

Compression:

Stored size: 800 Bytes

Contents

class Twitter::Client
  @@ACCOUNT_URIS = {
    :rate_limit_status => '/account/rate_limit_status',
  }
  
  # Provides access to the Twitter rate limit status API.
  # 
  # You can find out information about your account status.  Currently the only 
  # supported type of account status is the <tt>:rate_limit_status</tt> which 
  # returns a <tt>Twitter::RateLimitStatus</tt> object.
  # 
  # Example:
  #  account_status = client.account_info
  #  puts account_status.remaining_hits
  def account_info(type = :rate_limit_status)
    connection = create_http_connection
    connection.start do |connection|
      response = http_connect do |conn|
        create_http_get_request(@@ACCOUNT_URIS[type])
      end
      bless_models(Twitter::RateLimitStatus.unmarshal(response.body))
    end
  end
end

Version data entries

10 entries across 10 versions & 9 rubygems

Version Path
NewMonarch-twitter4r-0.3.2 lib/twitter/client/account.rb
craigtmackenzie-twitter4r-0.3.1 lib/twitter/client/account.rb
dambalah-twitter4r-0.3.3 lib/twitter/client/account.rb
dferranti-twitter4r-0.4.0.1 lib/twitter/client/account.rb
filipegiusti-twitter4r-0.3.2.1 lib/twitter/client/account.rb
joshuamiller-twitter4r-0.3.1.2 lib/twitter/client/account.rb
mbbx6spp-twitter4r-0.4.0 lib/twitter/client/account.rb
theill-twitter4r-0.3.2 lib/twitter/client/account.rb
twitter4r-0.3.2 lib/twitter/client/account.rb
twitter4r-0.3.1 lib/twitter/client/account.rb