Class: TheCity::GroupExportReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/group_export_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(group_export_id, options = {}, cacher = nil) ⇒ GroupExportReader

Constructor.

Parameters:

  • group_id

    The ID of the group to load.

  • options (defaults to: {})

    A hash of options for requesting data from the server.

    group_id is required

  • cacher (optional) (defaults to: nil)

    The CacheAdapter cacher to be used to cache data.



11
12
13
14
15
16
17
18
19
# File 'lib/readers/group_export_reader.rb', line 11

def initialize(group_export_id, options = {}, cacher = nil)
  group_id = options[:group_id]
  #@class_key = "group_export_#{group_id}_#{group_export_id}"   
  @url_data_path = "/groups/#{group_id}/exports/#{group_export_id}"
  @url_data_params = options
  
  # The object to store and load the cache.
  @cacher = cacher unless cacher.nil?    
end