cloudmersive-virus-scan-api-client 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/README.md +108 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-virus-scan-api-client.gemspec +45 -0
  6. data/docs/ScanApi.md +185 -0
  7. data/docs/VirusFound.md +9 -0
  8. data/docs/VirusScanAdvancedResult.md +15 -0
  9. data/docs/VirusScanResult.md +9 -0
  10. data/docs/WebsiteScanRequest.md +8 -0
  11. data/docs/WebsiteScanResult.md +11 -0
  12. data/git_push.sh +55 -0
  13. data/lib/cloudmersive-virus-scan-api-client.rb +45 -0
  14. data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +202 -0
  15. data/lib/cloudmersive-virus-scan-api-client/api_client.rb +391 -0
  16. data/lib/cloudmersive-virus-scan-api-client/api_error.rb +38 -0
  17. data/lib/cloudmersive-virus-scan-api-client/configuration.rb +209 -0
  18. data/lib/cloudmersive-virus-scan-api-client/models/virus_found.rb +196 -0
  19. data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb +258 -0
  20. data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_result.rb +198 -0
  21. data/lib/cloudmersive-virus-scan-api-client/models/website_scan_request.rb +186 -0
  22. data/lib/cloudmersive-virus-scan-api-client/models/website_scan_result.rb +252 -0
  23. data/lib/cloudmersive-virus-scan-api-client/version.rb +15 -0
  24. data/spec/api/scan_api_spec.rb +76 -0
  25. data/spec/api_client_spec.rb +243 -0
  26. data/spec/configuration_spec.rb +42 -0
  27. data/spec/models/virus_found_spec.rb +47 -0
  28. data/spec/models/virus_scan_advanced_result_spec.rb +83 -0
  29. data/spec/models/virus_scan_result_spec.rb +47 -0
  30. data/spec/models/website_scan_request_spec.rb +41 -0
  31. data/spec/models/website_scan_result_spec.rb +63 -0
  32. data/spec/spec_helper.rb +111 -0
  33. metadata +34 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aa02987ee26da7bbc8e6831cf6824ae09f3abc394833dc57c9ae6a020738608
4
- data.tar.gz: 928a25bf55c648df04cd5e0a3579a13e26db98e28724e9ccdfa03f90118b1936
3
+ metadata.gz: 79aeb7bd6275a848fd7273e8a89e2c1cdd2af0555d0a71e09a447739db7f1e93
4
+ data.tar.gz: 9cd8bdc398545b17dc569c09831cce540ff6557ecae46241793b3513c5221889
5
5
  SHA512:
6
- metadata.gz: e9022aec24f8c7551c8a2a3daaf71c3557d1d766ce40484c8464c8daa033e09d4191e3b94d95be3be1a1806d222890451f5f2b8a7ea2b73483f1f48c55f23f49
7
- data.tar.gz: bd13d85b2d4440bd96724a0e23e4659f07d6cd43f987bbc32e7db822b149e9c5888f9069f4db0e78558e33b98873d2a841ab3eb305253ba537899318db56847a
6
+ metadata.gz: 9f7a0b077fde051f1bb34149c26fd5bbd8a5bd394b075c44f506938c808f4975df31fdf841dc11c8c2ca902754fc1d50df4dd572270419462547f78459cc9399
7
+ data.tar.gz: 48d24c1a503ba6a9326c96d72937d7f37766af4939467283b7f07e13ff47847d1ff6d192bc7a3ec8d33f6aa0e3eb632205ed4953614c7fbe6ebb852aed4d63ff
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.3.3'
7
+ end
@@ -0,0 +1,108 @@
1
+ # cloudmersive-virus-scan-api-client
2
+
3
+ CloudmersiveVirusScanApiClient - the Ruby gem for the virusapi
4
+
5
+ The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: v1
10
+ - Package version: 2.0.2
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build cloudmersive-virus-scan-api-client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./cloudmersive-virus-scan-api-client-2.0.2.gem
27
+ ```
28
+ (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.2.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'cloudmersive-virus-scan-api-client', '~> 2.0.2'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
39
+
40
+ gem 'cloudmersive-virus-scan-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'cloudmersive-virus-scan-api-client'
56
+
57
+ # Setup authorization
58
+ CloudmersiveVirusScanApiClient.configure do |config|
59
+ # Configure API key authorization: Apikey
60
+ config.api_key['Apikey'] = 'YOUR API KEY'
61
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
62
+ #config.api_key_prefix['Apikey'] = 'Bearer'
63
+ end
64
+
65
+ api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
66
+
67
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
68
+
69
+
70
+ begin
71
+ #Scan a file for viruses
72
+ result = api_instance.scan_file(input_file)
73
+ p result
74
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
75
+ puts "Exception when calling ScanApi->scan_file: #{e}"
76
+ end
77
+
78
+ ```
79
+
80
+ ## Documentation for API Endpoints
81
+
82
+ All URIs are relative to *https://api.cloudmersive.com*
83
+
84
+ Class | Method | HTTP request | Description
85
+ ------------ | ------------- | ------------- | -------------
86
+ *CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file**](docs/ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
87
+ *CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file_advanced**](docs/ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
88
+ *CloudmersiveVirusScanApiClient::ScanApi* | [**scan_website**](docs/ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
89
+
90
+
91
+ ## Documentation for Models
92
+
93
+ - [CloudmersiveVirusScanApiClient::VirusFound](docs/VirusFound.md)
94
+ - [CloudmersiveVirusScanApiClient::VirusScanAdvancedResult](docs/VirusScanAdvancedResult.md)
95
+ - [CloudmersiveVirusScanApiClient::VirusScanResult](docs/VirusScanResult.md)
96
+ - [CloudmersiveVirusScanApiClient::WebsiteScanRequest](docs/WebsiteScanRequest.md)
97
+ - [CloudmersiveVirusScanApiClient::WebsiteScanResult](docs/WebsiteScanResult.md)
98
+
99
+
100
+ ## Documentation for Authorization
101
+
102
+
103
+ ### Apikey
104
+
105
+ - **Type**: API key
106
+ - **API key parameter name**: Apikey
107
+ - **Location**: HTTP header
108
+
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #virusapi
5
+
6
+ #The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
7
+
8
+ OpenAPI spec version: v1
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.14
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "cloudmersive-virus-scan-api-client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "cloudmersive-virus-scan-api-client"
20
+ s.version = CloudmersiveVirusScanApiClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Cloudmersive"]
23
+ s.email = [""]
24
+ s.homepage = "https://www.cloudmersive.com/virus-api"
25
+ s.summary = "Scan files and content for viruses."
26
+ s.description = "Virus API lets you scan files and content for viruses and identify security issues with content."
27
+ s.license = 'Apache 2.0'
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = Dir['./**/*']
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,185 @@
1
+ # CloudmersiveVirusScanApiClient::ScanApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**scan_file**](ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
8
+ [**scan_file_advanced**](ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
9
+ [**scan_website**](ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
10
+
11
+
12
+ # **scan_file**
13
+ > VirusScanResult scan_file(input_file)
14
+
15
+ Scan a file for viruses
16
+
17
+ Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'cloudmersive-virus-scan-api-client'
23
+ # setup authorization
24
+ CloudmersiveVirusScanApiClient.configure do |config|
25
+ # Configure API key authorization: Apikey
26
+ config.api_key['Apikey'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Apikey'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
32
+
33
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
34
+
35
+
36
+ begin
37
+ #Scan a file for viruses
38
+ result = api_instance.scan_file(input_file)
39
+ p result
40
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
41
+ puts "Exception when calling ScanApi->scan_file: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **input_file** | **File**| Input file to perform the operation on. |
50
+
51
+ ### Return type
52
+
53
+ [**VirusScanResult**](VirusScanResult.md)
54
+
55
+ ### Authorization
56
+
57
+ [Apikey](../README.md#Apikey)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: multipart/form-data
62
+ - **Accept**: application/json, text/json, application/xml, text/xml
63
+
64
+
65
+
66
+ # **scan_file_advanced**
67
+ > VirusScanAdvancedResult scan_file_advanced(input_file, opts)
68
+
69
+ Advanced Scan a file for viruses
70
+
71
+ Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
72
+
73
+ ### Example
74
+ ```ruby
75
+ # load the gem
76
+ require 'cloudmersive-virus-scan-api-client'
77
+ # setup authorization
78
+ CloudmersiveVirusScanApiClient.configure do |config|
79
+ # Configure API key authorization: Apikey
80
+ config.api_key['Apikey'] = 'YOUR API KEY'
81
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
82
+ #config.api_key_prefix['Apikey'] = 'Bearer'
83
+ end
84
+
85
+ api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
86
+
87
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
88
+
89
+ opts = {
90
+ allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
91
+ allow_invalid_files: true, # BOOLEAN | Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
92
+ allow_scripts: true, # BOOLEAN | Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
93
+ allow_password_protected_files: true, # BOOLEAN | Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
94
+ restrict_file_types: 'restrict_file_types_example' # String | Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
95
+ }
96
+
97
+ begin
98
+ #Advanced Scan a file for viruses
99
+ result = api_instance.scan_file_advanced(input_file, opts)
100
+ p result
101
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
102
+ puts "Exception when calling ScanApi->scan_file_advanced: #{e}"
103
+ end
104
+ ```
105
+
106
+ ### Parameters
107
+
108
+ Name | Type | Description | Notes
109
+ ------------- | ------------- | ------------- | -------------
110
+ **input_file** | **File**| Input file to perform the operation on. |
111
+ **allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
112
+ **allow_invalid_files** | **BOOLEAN**| Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended). | [optional]
113
+ **allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended). | [optional]
114
+ **allow_password_protected_files** | **BOOLEAN**| Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended). | [optional]
115
+ **restrict_file_types** | **String**| Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled. | [optional]
116
+
117
+ ### Return type
118
+
119
+ [**VirusScanAdvancedResult**](VirusScanAdvancedResult.md)
120
+
121
+ ### Authorization
122
+
123
+ [Apikey](../README.md#Apikey)
124
+
125
+ ### HTTP request headers
126
+
127
+ - **Content-Type**: multipart/form-data
128
+ - **Accept**: application/json, text/json, application/xml, text/xml
129
+
130
+
131
+
132
+ # **scan_website**
133
+ > WebsiteScanResult scan_website(input)
134
+
135
+ Scan a website for malicious content and threats
136
+
137
+ Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
138
+
139
+ ### Example
140
+ ```ruby
141
+ # load the gem
142
+ require 'cloudmersive-virus-scan-api-client'
143
+ # setup authorization
144
+ CloudmersiveVirusScanApiClient.configure do |config|
145
+ # Configure API key authorization: Apikey
146
+ config.api_key['Apikey'] = 'YOUR API KEY'
147
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
148
+ #config.api_key_prefix['Apikey'] = 'Bearer'
149
+ end
150
+
151
+ api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
152
+
153
+ input = CloudmersiveVirusScanApiClient::WebsiteScanRequest.new # WebsiteScanRequest |
154
+
155
+
156
+ begin
157
+ #Scan a website for malicious content and threats
158
+ result = api_instance.scan_website(input)
159
+ p result
160
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
161
+ puts "Exception when calling ScanApi->scan_website: #{e}"
162
+ end
163
+ ```
164
+
165
+ ### Parameters
166
+
167
+ Name | Type | Description | Notes
168
+ ------------- | ------------- | ------------- | -------------
169
+ **input** | [**WebsiteScanRequest**](WebsiteScanRequest.md)| |
170
+
171
+ ### Return type
172
+
173
+ [**WebsiteScanResult**](WebsiteScanResult.md)
174
+
175
+ ### Authorization
176
+
177
+ [Apikey](../README.md#Apikey)
178
+
179
+ ### HTTP request headers
180
+
181
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
182
+ - **Accept**: application/json, text/json, application/xml, text/xml
183
+
184
+
185
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveVirusScanApiClient::VirusFound
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **file_name** | **String** | Name of the file containing the virus | [optional]
7
+ **virus_name** | **String** | Name of the virus that was found | [optional]
8
+
9
+
@@ -0,0 +1,15 @@
1
+ # CloudmersiveVirusScanApiClient::VirusScanAdvancedResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the scan contained no viruses, false otherwise | [optional]
7
+ **contains_executable** | **BOOLEAN** | True if the scan contained an executable (application code), which can be a significant risk factor | [optional]
8
+ **contains_invalid_file** | **BOOLEAN** | True if the scan contained an invalid file (such as a PDF that is not a valid PDF, Word Document that is not a valid Word Document, etc.), which can be a significant risk factor | [optional]
9
+ **contains_script** | **BOOLEAN** | True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor | [optional]
10
+ **contains_password_protected_file** | **BOOLEAN** | True if the scan contained a password protected or encrypted file, which can be a significant risk factor | [optional]
11
+ **contains_restricted_file_format** | **BOOLEAN** | True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false | [optional]
12
+ **verified_file_format** | **String** | For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null. | [optional]
13
+ **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
14
+
15
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveVirusScanApiClient::VirusScanResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the scan contained no viruses, false otherwise | [optional]
7
+ **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveVirusScanApiClient::WebsiteScanRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | URL of the website to scan; should begin with http:// or https:// | [optional]
7
+
8
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveVirusScanApiClient::WebsiteScanResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the scan contained no threats, false otherwise | [optional]
7
+ **website_threat_type** | **String** | Type of threat returned; can be None, Malware, ForcedDownload or Phishing | [optional]
8
+ **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
9
+ **website_http_response_code** | **Integer** | The remote server URL HTTP reasponse code; useful for debugging issues with scanning; typically if the remote server returns a 200 or 300-series code this means a successful response, while a 400 or 500 series code would represent an error returned from the remote server for the provided URL. | [optional]
10
+
11
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+