2019-05-19 19:12:26 -05:00
|
|
|
#require '../modules/scans_io_tools'
|
2019-05-19 17:51:29 -05:00
|
|
|
require 'json'
|
|
|
|
require 'restclient'
|
|
|
|
|
|
|
|
module ScansIoTools
|
|
|
|
class ScansIoDownloader
|
|
|
|
attr_accessor :base_url, :index_response
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
@base_url = "https://scans.io"
|
|
|
|
@index_response = self.get_json_index.body
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_json_index
|
|
|
|
response = RestClient.get "#{base_url}/json"
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|