Module: Filescan::Client::Scan
- Included in:
- Filescan::Client
- Defined in:
- lib/filescan/client/scan.rb
Instance Method Summary collapse
Instance Method Details
#check_file(file) ⇒ Object
8 9 10 11 12 |
# File 'lib/filescan/client/scan.rb', line 8 def check_file(file) payload = { file: Faraday::UploadIO.new(file.path, MIME::Types.of(file.path).first.content_type) } resp = @connection.post("projects/#{@project_id}/scans", payload) Oj.load(resp.body) end |
#scan_report(scan_id) ⇒ Object
14 15 16 17 |
# File 'lib/filescan/client/scan.rb', line 14 def scan_report(scan_id) resp = @connection.get("projects/#{project_id}/scans/#{scan_id}") Oj.load(resp.body) end |