Class: TheCity::UserCountReader

Inherits:
ApiReader show all
Defined in:
lib/readers/user_count_reader.rb

Instance Attribute Summary

Attributes inherited from ApiReader

#headers

Instance Method Summary collapse

Methods inherited from ApiReader

#load_feed, #rate_limit, #rate_limit_remaining

Constructor Details

#initialize(options = {}, cacher = nil) ⇒ UserCountReader

Constructor.

Options:

:filter - The Reader to use to load the data.

Examples:

UserCount.new

UserCount.new({:filter => :created_in_the_last_7_Days})

Parameters:

  • options (optional) (defaults to: {})

    Options for including more information.

  • cacher (CacheAdapter) (defaults to: nil)

    (optional) The cacher to be used to cache data.



18
19
20
21
22
23
24
25
26
# File 'lib/readers/user_count_reader.rb', line 18

def initialize(options = {}, cacher = nil)
  #@class_key = "users_count_#{options[:filter] || ''}"   
  @url_data_path = "/users/count"

  @url_data_params = {:filter => options[:filter] || ''}    

  # The object to store and load the cache.
  @cacher = cacher unless cacher.nil?    
end