Sha256: 8ada026e4a2e65e4f49797cd79a315abe03d6c655e367572bf5efb01093565c2
Contents?: true
Size: 478 Bytes
Versions: 4
Compression:
Stored size: 478 Bytes
Contents
require 'hashie' require 'json' require 'trackit_scraper/2003.10.1' class Provider def initialize(url) @url = url end def get_requests(users, options={}) Dir.mktmpdir do |output_dir| options[:output_dir] = output_dir trackit = TrackIt.new @url, users[0][:username], users[0][:password], options trackit.scrape_requests_for_users users return Dir["#{output_dir}/*"].map { |f| Hashie::Mash.new JSON.parse(File.read(f)) } end end end
Version data entries
4 entries across 4 versions & 1 rubygems