Sha256: 4c4b046f19c94059d6214fba4574df7022c413a596e5756c3eecce63a87e564d
Contents?: true
Size: 646 Bytes
Versions: 1
Compression:
Stored size: 646 Bytes
Contents
module TheCity # This adapter is the standard for all loading objects. class ApiReader # Constructor # def initialize # end # Loads the list # # @return the data loaded in a JSON object. def load_feed # if !@cacher.nil? and !@cacher.is_cache_expired?( @class_key ) # data = @cacher.get_data( @class_key ) # else @url_data_params ||= {} response = TheCity::admin_request(:get, @url_data_path, @url_data_params) data = JSON.parse(response.body) @cacher.save_data(@class_key, data) unless @cacher.nil? #end return data end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
the-city-admin-0.2.1 | lib/readers/api_reader.rb |