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

Version Path
help_desk_dashboard-0.0.8 lib/help_desk_dashboard/lib/providers/track-it/2003.10.1/provider.rb
help_desk_dashboard-0.0.7 lib/help_desk_dashboard/lib/providers/track-it/2003.10.1/provider.rb
help_desk_dashboard-0.0.6 lib/help_desk_dashboard/lib/providers/track-it/2003.10.1/provider.rb
help_desk_dashboard-0.0.5 lib/help_desk_dashboard/lib/providers/track-it/2003.10.1/provider.rb