filescan-api 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1882a0390d06232252a1b3c30c2ec71efe0e42fcec921fa9fdfa26708ed11ed2
4
- data.tar.gz: d41523cd5e4d5d8a809d8b4015becd9c3f07104f668f99be1ac516bc76cc1925
3
+ metadata.gz: abfb04aeeabdd4cb6e5d52ff38f30833ed174be0c4458b8c5eb3c5ecdd078db3
4
+ data.tar.gz: 3e1af1268d3da2504c4b011833bb0c9ee6e456cfe6e9552f256f7e72a6418d9b
5
5
  SHA512:
6
- metadata.gz: c25750896258ee8834b2622f0fb59126a0eb73321bfb8661deb42edd513527d732e8a66419d5b720137d3caf169e0db9c1d51468d806dee0790828cdc57bf8f6
7
- data.tar.gz: 45b7fc59bd0b2d2964f1982346db5d1c9975c44495b87b71aaa067da282d51ad38f645d4e0a91ebc7a13750a952f6b18df092b87c3409936468338190de1884f
6
+ metadata.gz: d84f276aeea5d34f51c6fa8dcc677faba99148b3d6d77b3cc8b48aa674d5763a939aa59810844613c34f115dea7e1a1ed6b372276a7a11627d61c1341811f8ce
7
+ data.tar.gz: 110f1652f95d098ee502fc6ca7c29843bbd5b82eb4c5fa038d4e570e8195db7eeb32b3bf5f7afc1a4f4dcc55891069f44f8c45f64f9ce076a7f63a1ff0d1956d
data/README.md CHANGED
@@ -25,7 +25,7 @@ require 'filescan'
25
25
  client = Filescan::Client.new(api_key=YOUR_API_KEY)
26
26
  client.list_projects
27
27
  client.project_id = PROJECT_ID_YOU_WANT_TO_USE
28
- scan_id = client.check_file(File.open('malicious_file', 'rb'))["data"]["id"]
28
+ scan_id = client.check_file(File.open('malicious_file', 'rb'))["id"]
29
29
  result = client.scan_report(scan_id)
30
30
  ```
31
31
 
@@ -5,8 +5,8 @@ module FilescanApi
5
5
 
6
6
  def list_projects
7
7
  resp = @connection.get("projects")
8
- Oj.load(resp.body)
8
+ Oj.load(resp.body)['data']
9
9
  end
10
10
  end
11
11
  end
12
- end
12
+ end
@@ -8,13 +8,13 @@ module FilescanApi
8
8
  def check_file(file)
9
9
  payload = { file: Faraday::UploadIO.new(file.path, MIME::Types.of(file.path).first.content_type) }
10
10
  resp = @connection.post("projects/#{@project_id}/scans", payload)
11
- Oj.load(resp.body)
11
+ Oj.load(resp.body)['data']
12
12
  end
13
13
 
14
14
  def scan_report(scan_id)
15
15
  resp = @connection.get("projects/#{project_id}/scans/#{scan_id}")
16
- Oj.load(resp.body)
16
+ Oj.load(resp.body)['data']
17
17
  end
18
18
  end
19
19
  end
20
- end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module FilescanApi
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filescan-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Kozak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-27 00:00:00.000000000 Z
11
+ date: 2019-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.7.9
141
+ rubygems_version: 2.7.3
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: FileScan.dev API wrapper