cloudmersive-phishing-detection-api-client 2.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.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +112 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-phishing-detection-api-client.gemspec +45 -0
  6. data/docs/PhishingUrlAdvancedRequest.md +10 -0
  7. data/docs/PhishingUrlAdvancedRequestBatch.md +10 -0
  8. data/docs/PhishingUrlAdvancedResponse.md +18 -0
  9. data/docs/PhishingUrlAdvancedResponseBatch.md +9 -0
  10. data/docs/PhishingUrlApi.md +120 -0
  11. data/docs/PhishingUrlBatchApi.md +120 -0
  12. data/docs/PhishingUrlRequest.md +8 -0
  13. data/docs/PhishingUrlResponse.md +13 -0
  14. data/docs/PhishingUrlResponseBatch.md +9 -0
  15. data/git_push.sh +55 -0
  16. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_api.rb +123 -0
  17. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_batch_api.rb +123 -0
  18. data/lib/cloudmersive-phishing-detection-api-client/api_client.rb +391 -0
  19. data/lib/cloudmersive-phishing-detection-api-client/api_error.rb +38 -0
  20. data/lib/cloudmersive-phishing-detection-api-client/configuration.rb +209 -0
  21. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_request.rb +234 -0
  22. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_request_batch.rb +217 -0
  23. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_response.rb +286 -0
  24. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_response_batch.rb +198 -0
  25. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_request.rb +191 -0
  26. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_response.rb +236 -0
  27. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_response_batch.rb +198 -0
  28. data/lib/cloudmersive-phishing-detection-api-client/version.rb +15 -0
  29. data/lib/cloudmersive-phishing-detection-api-client.rb +48 -0
  30. data/spec/api/phishing_url_api_spec.rb +59 -0
  31. data/spec/api/phishing_url_batch_api_spec.rb +59 -0
  32. data/spec/api_client_spec.rb +243 -0
  33. data/spec/configuration_spec.rb +42 -0
  34. data/spec/models/phishing_url_advanced_request_batch_spec.rb +53 -0
  35. data/spec/models/phishing_url_advanced_request_spec.rb +53 -0
  36. data/spec/models/phishing_url_advanced_response_batch_spec.rb +47 -0
  37. data/spec/models/phishing_url_advanced_response_spec.rb +101 -0
  38. data/spec/models/phishing_url_request_spec.rb +41 -0
  39. data/spec/models/phishing_url_response_batch_spec.rb +47 -0
  40. data/spec/models/phishing_url_response_spec.rb +71 -0
  41. data/spec/spec_helper.rb +111 -0
  42. metadata +264 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: db228aa9d3ba68d5c357d0e2c18406b8a07d45ba975d5098edbf37db529f9c40
4
+ data.tar.gz: 5fc22a0c015282b5a962acd6572a9694e3c575abfef1db1037bda97f471f83a4
5
+ SHA512:
6
+ metadata.gz: 73acce08567c2ca1e0e5647a224a5d09c18d24ed65e1aef69b6889708879bf0f0a008a02f644ec3b7c597375eb0eb893fe0d14fb09d07fc4fba467a286867228
7
+ data.tar.gz: 652d44d39aa4a733742a5eb98be2069d4e979de5fa2cf8a26b073e5a1a750c73b6b900dccc4a3e9fbf6cd00b56f2efcd8cc3eba3e2bcb97f22c17e41f1c7b2e9
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
data/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # cloudmersive-phishing-detection-api-client
2
+
3
+ CloudmersivePhishingDetectionApiClient - the Ruby gem for the phishingapi
4
+
5
+ Easily and directly scan and block phishing security threats.
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.2.0
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-phishing-detection-api-client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./cloudmersive-phishing-detection-api-client-2.2.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.0.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-phishing-detection-api-client', '~> 2.2.0'
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-phishing-detection-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-phishing-detection-api-client'
56
+
57
+ # Setup authorization
58
+ CloudmersivePhishingDetectionApiClient.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 = CloudmersivePhishingDetectionApiClient::PhishingUrlApi.new
66
+
67
+ opts = {
68
+ body: CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequest.new # PhishingUrlAdvancedRequest |
69
+ }
70
+
71
+ begin
72
+ #Use advanced AI detection to determine if a URL is a known phishing threat
73
+ result = api_instance.phishing_url_advanced_post(opts)
74
+ p result
75
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
76
+ puts "Exception when calling PhishingUrlApi->phishing_url_advanced_post: #{e}"
77
+ end
78
+
79
+ ```
80
+
81
+ ## Documentation for API Endpoints
82
+
83
+ All URIs are relative to *https://localhost*
84
+
85
+ Class | Method | HTTP request | Description
86
+ ------------ | ------------- | ------------- | -------------
87
+ *CloudmersivePhishingDetectionApiClient::PhishingUrlApi* | [**phishing_url_advanced_post**](docs/PhishingUrlApi.md#phishing_url_advanced_post) | **POST** /phishing/url/advanced | Use advanced AI detection to determine if a URL is a known phishing threat
88
+ *CloudmersivePhishingDetectionApiClient::PhishingUrlApi* | [**phishing_url_post**](docs/PhishingUrlApi.md#phishing_url_post) | **POST** /phishing/url | Use AI and deterministic detection to determine if a URL is a phishing threat
89
+ *CloudmersivePhishingDetectionApiClient::PhishingUrlBatchApi* | [**phishing_url_advanced_batch_post**](docs/PhishingUrlBatchApi.md#phishing_url_advanced_batch_post) | **POST** /phishing/url/advanced/batch | Accept multiple urls at once to perform lookups to see if the urls are known phishing sites as well as multiple other scans to determine if the URL is a potential phishing threat.
90
+ *CloudmersivePhishingDetectionApiClient::PhishingUrlBatchApi* | [**phishing_url_batch_post**](docs/PhishingUrlBatchApi.md#phishing_url_batch_post) | **POST** /phishing/url/batch | Accept multiple urls at oncee and perform AI and deterministic methods to detect if a URL is a phishing threat.
91
+
92
+
93
+ ## Documentation for Models
94
+
95
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequest](docs/PhishingUrlAdvancedRequest.md)
96
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequestBatch](docs/PhishingUrlAdvancedRequestBatch.md)
97
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedResponse](docs/PhishingUrlAdvancedResponse.md)
98
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedResponseBatch](docs/PhishingUrlAdvancedResponseBatch.md)
99
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlRequest](docs/PhishingUrlRequest.md)
100
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlResponse](docs/PhishingUrlResponse.md)
101
+ - [CloudmersivePhishingDetectionApiClient::PhishingUrlResponseBatch](docs/PhishingUrlResponseBatch.md)
102
+
103
+
104
+ ## Documentation for Authorization
105
+
106
+
107
+ ### Apikey
108
+
109
+ - **Type**: API key
110
+ - **API key parameter name**: Apikey
111
+ - **Location**: HTTP header
112
+
data/Rakefile ADDED
@@ -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
+ #phishingapi
5
+
6
+ #Easily and directly scan and block phishing security threats.
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-phishing-detection-api-client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "cloudmersive-phishing-detection-api-client"
20
+ s.version = CloudmersivePhishingDetectionApiClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Cloudmersive"]
23
+ s.email = [""]
24
+ s.homepage = "https://www.cloudmersive.com/phishing-api"
25
+ s.summary = "Scan URLs for phishing."
26
+ s.description = "Phishing Detection API lets you scan websites for phishing attacks using AI."
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,10 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | Full url data to be evaluated |
7
+ **allow_list** | **Array<String>** | The caller may specify a collection of hosts or domains which are always considered safe.<br /> This is to allow internal sites to be marked as safe | [optional]
8
+ **block_list** | **Array<String>** | The caller may specify a collection of hosts or domains which are always considered unsafe.<br /> This is to allow internal sites to be marked as safe | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequestBatch
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **urls** | **Array<String>** | Collection of all urls to check |
7
+ **allow_list** | **Array<String>** | The caller may specify a collection of hosts or domains which are always considered safe.<br /> This is to allow internal sites to be marked as safe | [optional]
8
+ **block_list** | **Array<String>** | The caller may specify a collection of hosts or domains which are always considered unsafe.<br /> This is to allow internal sites to be marked as safe | [optional]
9
+
10
+
@@ -0,0 +1,18 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | Specifies if the url (or its host or domain) passed all the checks or not. | [optional]
7
+ **risk** | **Float** | Risk value from 0.0 - 1.0. Higher numbers are a higher risk <br />Anything below 0.3 should be considered safe. Anything above 0.7 should be considered a significant risk. <br /> A score of 1.0 indicates the url, host, or domain failed significant safety checks.<br /> If a url passes all the tests for the basic api, the risk will be 0.7. If a url passes all the tests for the advanced api, the risk will be 0.2. | [optional]
8
+ **contains_threat_url** | **BOOLEAN** | Specifies if the full url with query parameters and fragment is a phishing threat <br />The advanced api performs more checks on the full url. | [optional]
9
+ **contains_threat_host** | **BOOLEAN** | Specifies if the host of the url (i.e. ```mysite.hostingsite.com``` for a url of ```https://mysite.hostingsite.com/index.html```) is a phishing threat <br />The advanced api performs more checks on the host | [optional]
10
+ **contains_threat_domain** | **BOOLEAN** | Specifies if the registerable domain of the url (i.e. ```hostingsite.com``` for a url of ```https://mysite.hostingsite.com/index.html```) is a phishing threat <br />The advanced api performs more checks on the domain | [optional]
11
+ **contains_threat_ssrf** | **BOOLEAN** | The url that was provided or the destination url after redirection contains an SSRF threat | [optional]
12
+ **contains_threat_url_format** | **BOOLEAN** | The url that was provided or the destination url after redirection is an unsafe format | [optional]
13
+ **contains_threat_domain_quality** | **BOOLEAN** | The domain of the destination url is low quality. | [optional]
14
+ **contains_threat_domain_age** | **BOOLEAN** | The domain of the destination url has been registered too recently. | [optional]
15
+ **url_is_invalid_syntax** | **BOOLEAN** | Specifies if the url was malformed or not | [optional]
16
+ **input_url** | **String** | Input URL that was scanned | [optional]
17
+
18
+
@@ -0,0 +1,9 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedResponseBatch
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | Specifies if all the urls (or its hosts or domains) in this batch call passed all the checks or not. | [optional]
7
+ **url_responses** | [**Array<PhishingUrlAdvancedResponse>**](PhishingUrlAdvancedResponse.md) | Resulting URL validations | [optional]
8
+
9
+
@@ -0,0 +1,120 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**phishing_url_advanced_post**](PhishingUrlApi.md#phishing_url_advanced_post) | **POST** /phishing/url/advanced | Use advanced AI detection to determine if a URL is a known phishing threat
8
+ [**phishing_url_post**](PhishingUrlApi.md#phishing_url_post) | **POST** /phishing/url | Use AI and deterministic detection to determine if a URL is a phishing threat
9
+
10
+
11
+ # **phishing_url_advanced_post**
12
+ > PhishingUrlAdvancedResponse phishing_url_advanced_post(opts)
13
+
14
+ Use advanced AI detection to determine if a URL is a known phishing threat
15
+
16
+ Uses advanced AI and deterministic methods to detect if a URL is a phishing threat.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'cloudmersive-phishing-detection-api-client'
22
+ # setup authorization
23
+ CloudmersivePhishingDetectionApiClient.configure do |config|
24
+ # Configure API key authorization: Apikey
25
+ config.api_key['Apikey'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Apikey'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = CloudmersivePhishingDetectionApiClient::PhishingUrlApi.new
31
+
32
+ opts = {
33
+ body: CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequest.new # PhishingUrlAdvancedRequest |
34
+ }
35
+
36
+ begin
37
+ #Use advanced AI detection to determine if a URL is a known phishing threat
38
+ result = api_instance.phishing_url_advanced_post(opts)
39
+ p result
40
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
41
+ puts "Exception when calling PhishingUrlApi->phishing_url_advanced_post: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **body** | [**PhishingUrlAdvancedRequest**](PhishingUrlAdvancedRequest.md)| | [optional]
50
+
51
+ ### Return type
52
+
53
+ [**PhishingUrlAdvancedResponse**](PhishingUrlAdvancedResponse.md)
54
+
55
+ ### Authorization
56
+
57
+ [Apikey](../README.md#Apikey)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml
62
+ - **Accept**: text/plain, application/json, text/json, application/xml, text/xml
63
+
64
+
65
+
66
+ # **phishing_url_post**
67
+ > PhishingUrlResponse phishing_url_post(opts)
68
+
69
+ Use AI and deterministic detection to determine if a URL is a phishing threat
70
+
71
+ Uses AI and deterministic methods to detect if a URL is a phishing threat.
72
+
73
+ ### Example
74
+ ```ruby
75
+ # load the gem
76
+ require 'cloudmersive-phishing-detection-api-client'
77
+ # setup authorization
78
+ CloudmersivePhishingDetectionApiClient.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 = CloudmersivePhishingDetectionApiClient::PhishingUrlApi.new
86
+
87
+ opts = {
88
+ body: CloudmersivePhishingDetectionApiClient::PhishingUrlRequest.new # PhishingUrlRequest |
89
+ }
90
+
91
+ begin
92
+ #Use AI and deterministic detection to determine if a URL is a phishing threat
93
+ result = api_instance.phishing_url_post(opts)
94
+ p result
95
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
96
+ puts "Exception when calling PhishingUrlApi->phishing_url_post: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ Name | Type | Description | Notes
103
+ ------------- | ------------- | ------------- | -------------
104
+ **body** | [**PhishingUrlRequest**](PhishingUrlRequest.md)| | [optional]
105
+
106
+ ### Return type
107
+
108
+ [**PhishingUrlResponse**](PhishingUrlResponse.md)
109
+
110
+ ### Authorization
111
+
112
+ [Apikey](../README.md#Apikey)
113
+
114
+ ### HTTP request headers
115
+
116
+ - **Content-Type**: application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml
117
+ - **Accept**: text/plain, application/json, text/json, application/xml, text/xml
118
+
119
+
120
+
@@ -0,0 +1,120 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlBatchApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**phishing_url_advanced_batch_post**](PhishingUrlBatchApi.md#phishing_url_advanced_batch_post) | **POST** /phishing/url/advanced/batch | Accept multiple urls at once to perform lookups to see if the urls are known phishing sites as well as multiple other scans to determine if the URL is a potential phishing threat.
8
+ [**phishing_url_batch_post**](PhishingUrlBatchApi.md#phishing_url_batch_post) | **POST** /phishing/url/batch | Accept multiple urls at oncee and perform AI and deterministic methods to detect if a URL is a phishing threat.
9
+
10
+
11
+ # **phishing_url_advanced_batch_post**
12
+ > PhishingUrlAdvancedResponseBatch phishing_url_advanced_batch_post(opts)
13
+
14
+ Accept multiple urls at once to perform lookups to see if the urls are known phishing sites as well as multiple other scans to determine if the URL is a potential phishing threat.
15
+
16
+ Uses advanced AI and deterministic methods to detect if a URL is a phishing threat.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'cloudmersive-phishing-detection-api-client'
22
+ # setup authorization
23
+ CloudmersivePhishingDetectionApiClient.configure do |config|
24
+ # Configure API key authorization: Apikey
25
+ config.api_key['Apikey'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Apikey'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = CloudmersivePhishingDetectionApiClient::PhishingUrlBatchApi.new
31
+
32
+ opts = {
33
+ body: CloudmersivePhishingDetectionApiClient::PhishingUrlAdvancedRequestBatch.new # PhishingUrlAdvancedRequestBatch |
34
+ }
35
+
36
+ begin
37
+ #Accept multiple urls at once to perform lookups to see if the urls are known phishing sites as well as multiple other scans to determine if the URL is a potential phishing threat.
38
+ result = api_instance.phishing_url_advanced_batch_post(opts)
39
+ p result
40
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
41
+ puts "Exception when calling PhishingUrlBatchApi->phishing_url_advanced_batch_post: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **body** | [**PhishingUrlAdvancedRequestBatch**](PhishingUrlAdvancedRequestBatch.md)| | [optional]
50
+
51
+ ### Return type
52
+
53
+ [**PhishingUrlAdvancedResponseBatch**](PhishingUrlAdvancedResponseBatch.md)
54
+
55
+ ### Authorization
56
+
57
+ [Apikey](../README.md#Apikey)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml
62
+ - **Accept**: text/plain, application/json, text/json, application/xml, text/xml
63
+
64
+
65
+
66
+ # **phishing_url_batch_post**
67
+ > PhishingUrlResponseBatch phishing_url_batch_post(opts)
68
+
69
+ Accept multiple urls at oncee and perform AI and deterministic methods to detect if a URL is a phishing threat.
70
+
71
+ Uses AI and deterministic methods to detect if a URL is a phishing threat.
72
+
73
+ ### Example
74
+ ```ruby
75
+ # load the gem
76
+ require 'cloudmersive-phishing-detection-api-client'
77
+ # setup authorization
78
+ CloudmersivePhishingDetectionApiClient.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 = CloudmersivePhishingDetectionApiClient::PhishingUrlBatchApi.new
86
+
87
+ opts = {
88
+ body: [CloudmersivePhishingDetectionApiClient::PhishingUrlRequest.new] # Array<PhishingUrlRequest> |
89
+ }
90
+
91
+ begin
92
+ #Accept multiple urls at oncee and perform AI and deterministic methods to detect if a URL is a phishing threat.
93
+ result = api_instance.phishing_url_batch_post(opts)
94
+ p result
95
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
96
+ puts "Exception when calling PhishingUrlBatchApi->phishing_url_batch_post: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ Name | Type | Description | Notes
103
+ ------------- | ------------- | ------------- | -------------
104
+ **body** | [**Array&lt;PhishingUrlRequest&gt;**](PhishingUrlRequest.md)| | [optional]
105
+
106
+ ### Return type
107
+
108
+ [**PhishingUrlResponseBatch**](PhishingUrlResponseBatch.md)
109
+
110
+ ### Authorization
111
+
112
+ [Apikey](../README.md#Apikey)
113
+
114
+ ### HTTP request headers
115
+
116
+ - **Content-Type**: application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml
117
+ - **Accept**: text/plain, application/json, text/json, application/xml, text/xml
118
+
119
+
120
+
@@ -0,0 +1,8 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | Full url to be evaluated |
7
+
8
+
@@ -0,0 +1,13 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | Specifies if the url (or its host or domain) passed all the checks or not. | [optional]
7
+ **risk** | **Float** | Risk value from 0.0 - 1.0. Higher numbers are a higher risk &lt;br /&gt;Anything below 0.3 should be considered safe. Anything above 0.7 should be considered a significant risk. &lt;br /&gt; A score of 1.0 indicates the url, host, or domain failed significant safety checks.&lt;br /&gt; If a url passes all the tests for the basic api, the risk will be 0.7. If a url passes all the tests for the advanced api, the risk will be 0.2. | [optional]
8
+ **contains_threat_url** | **BOOLEAN** | Specifies if the full url with query parameters and fragment is a phishing threat &lt;br /&gt;The advanced api performs more checks on the full url. | [optional]
9
+ **contains_threat_host** | **BOOLEAN** | Specifies if the host of the url (i.e. &#x60;&#x60;&#x60;mysite.hostingsite.com&#x60;&#x60;&#x60; for a url of &#x60;&#x60;&#x60;https://mysite.hostingsite.com/index.html&#x60;&#x60;&#x60;) is a phishing threat &lt;br /&gt;The advanced api performs more checks on the host | [optional]
10
+ **contains_threat_domain** | **BOOLEAN** | Specifies if the registerable domain of the url (i.e. &#x60;&#x60;&#x60;hostingsite.com&#x60;&#x60;&#x60; for a url of &#x60;&#x60;&#x60;https://mysite.hostingsite.com/index.html&#x60;&#x60;&#x60;) is a phishing threat &lt;br /&gt;The advanced api performs more checks on the domain | [optional]
11
+ **input_url** | **String** | Input URL that was scanned | [optional]
12
+
13
+
@@ -0,0 +1,9 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingUrlResponseBatch
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | Specifies if all the urls (or its hosts or domains) in this batch call passed all the checks or not. | [optional]
7
+ **url_responses** | [**Array&lt;PhishingUrlResponse&gt;**](PhishingUrlResponse.md) | Dictionary where the requesting url is the key and the value is the resulting validation | [optional]
8
+
9
+
data/git_push.sh ADDED
@@ -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
+