Sha256: bed578dbd6acba6edbf999e125606b5f33dffbbbb879b851253284f728296367

Contents?: true

Size: 744 Bytes

Versions: 5

Compression:

Stored size: 744 Bytes

Contents

module TheCity

  class GroupListReader < ApiReader

    # Constructor.
    #
    # @param page The page number to get.  Default is 1.
    # @param options A hash of options for requesting data from the server.
    # @param [CacheAdapter] cacher (optional) The cacher to be used to cache data.
    def initialize(options = {}, cacher = nil) 
      page = options[:page] || 1
      filter = options[:filter] 

      @class_key = "group_list_#{page}_#{filter.to_s.downcase.gsub(' ','')}"  
      @url_data_path = "/groups"
      @url_data_params = {:page => page}
      @url_data_params.merge!({:filter => filter}) if filter
      
      # The object to store and load the cache.
      @cacher = cacher unless cacher.nil?    
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
the-city-admin-0.1.4 lib/readers/group_list_reader.rb
the-city-admin-0.1.3 lib/readers/group_list_reader.rb
the-city-admin-0.1.2 lib/readers/group_list_reader.rb
the-city-admin-0.1.1 lib/readers/group_list_reader.rb
the-city-admin-0.1.0 lib/readers/group_list_reader.rb