cloudmersive-phishing-detection-api-client 2.2.0 → 2.2.1

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -21
  3. data/cloudmersive-phishing-detection-api-client.gemspec +1 -1
  4. data/docs/AdvancedEmailDetectionRequest.md +14 -0
  5. data/docs/PhishingDetectionAdvancedRequest.md +9 -0
  6. data/docs/PhishingDetectionAdvancedResponse.md +10 -0
  7. data/docs/PhishingDetectionApi.md +228 -0
  8. data/docs/PhishingDetectionEmailAdvancedResponse.md +17 -0
  9. data/docs/PhishingDetectionResponse.md +8 -0
  10. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_detection_api.rb +223 -0
  11. data/lib/cloudmersive-phishing-detection-api-client/api_client.rb +1 -1
  12. data/lib/cloudmersive-phishing-detection-api-client/api_error.rb +1 -1
  13. data/lib/cloudmersive-phishing-detection-api-client/configuration.rb +1 -1
  14. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_advanced_request.rb → advanced_email_detection_request.rb} +72 -46
  15. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_advanced_response_batch.rb → phishing_detection_advanced_request.rb} +18 -20
  16. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_response_batch.rb → phishing_detection_advanced_response.rb} +22 -14
  17. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_response.rb → phishing_detection_email_advanced_response.rb} +80 -40
  18. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_request.rb → phishing_detection_response.rb} +11 -16
  19. data/lib/cloudmersive-phishing-detection-api-client/version.rb +2 -2
  20. data/lib/cloudmersive-phishing-detection-api-client.rb +7 -10
  21. data/spec/api/phishing_detection_api_spec.rb +81 -0
  22. data/spec/api_client_spec.rb +1 -1
  23. data/spec/configuration_spec.rb +1 -1
  24. data/spec/models/{phishing_url_response_spec.rb → advanced_email_detection_request_spec.rb} +19 -13
  25. data/spec/models/{phishing_url_advanced_response_batch_spec.rb → phishing_detection_advanced_request_spec.rb} +9 -9
  26. data/spec/models/{phishing_url_advanced_request_spec.rb → phishing_detection_advanced_response_spec.rb} +10 -10
  27. data/spec/models/{phishing_url_advanced_response_spec.rb → phishing_detection_email_advanced_response_spec.rb} +16 -22
  28. data/spec/models/{phishing_url_request_spec.rb → phishing_detection_response_spec.rb} +8 -8
  29. data/spec/spec_helper.rb +1 -1
  30. metadata +20 -29
  31. data/docs/PhishingUrlAdvancedRequest.md +0 -10
  32. data/docs/PhishingUrlAdvancedRequestBatch.md +0 -10
  33. data/docs/PhishingUrlAdvancedResponse.md +0 -18
  34. data/docs/PhishingUrlAdvancedResponseBatch.md +0 -9
  35. data/docs/PhishingUrlApi.md +0 -120
  36. data/docs/PhishingUrlBatchApi.md +0 -120
  37. data/docs/PhishingUrlRequest.md +0 -8
  38. data/docs/PhishingUrlResponse.md +0 -13
  39. data/docs/PhishingUrlResponseBatch.md +0 -9
  40. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_api.rb +0 -123
  41. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_batch_api.rb +0 -123
  42. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_request_batch.rb +0 -217
  43. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_response.rb +0 -286
  44. data/spec/api/phishing_url_api_spec.rb +0 -59
  45. data/spec/api/phishing_url_batch_api_spec.rb +0 -59
  46. data/spec/models/phishing_url_advanced_request_batch_spec.rb +0 -53
  47. data/spec/models/phishing_url_response_batch_spec.rb +0 -47
@@ -1,120 +0,0 @@
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
-
@@ -1,120 +0,0 @@
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
-
@@ -1,8 +0,0 @@
1
- # CloudmersivePhishingDetectionApiClient::PhishingUrlRequest
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **url** | **String** | Full url to be evaluated |
7
-
8
-
@@ -1,13 +0,0 @@
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
-
@@ -1,9 +0,0 @@
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
-
@@ -1,123 +0,0 @@
1
- =begin
2
- #phishingapi
3
-
4
- #Easily and directly scan and block phishing security threats.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.14
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module CloudmersivePhishingDetectionApiClient
16
- class PhishingUrlApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Use advanced AI detection to determine if a URL is a known phishing threat
23
- # Uses advanced AI and deterministic methods to detect if a URL is a phishing threat.
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [PhishingUrlAdvancedRequest] :body
26
- # @return [PhishingUrlAdvancedResponse]
27
- def phishing_url_advanced_post(opts = {})
28
- data, _status_code, _headers = phishing_url_advanced_post_with_http_info(opts)
29
- data
30
- end
31
-
32
- # Use advanced AI detection to determine if a URL is a known phishing threat
33
- # Uses advanced AI and deterministic methods to detect if a URL is a phishing threat.
34
- # @param [Hash] opts the optional parameters
35
- # @option opts [PhishingUrlAdvancedRequest] :body
36
- # @return [Array<(PhishingUrlAdvancedResponse, Fixnum, Hash)>] PhishingUrlAdvancedResponse data, response status code and response headers
37
- def phishing_url_advanced_post_with_http_info(opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: PhishingUrlApi.phishing_url_advanced_post ...'
40
- end
41
- # resource path
42
- local_var_path = '/phishing/url/advanced'
43
-
44
- # query parameters
45
- query_params = {}
46
-
47
- # header parameters
48
- header_params = {}
49
- # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
51
- # HTTP header 'Content-Type'
52
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])
53
-
54
- # form parameters
55
- form_params = {}
56
-
57
- # http body (model)
58
- post_body = @api_client.object_to_http_body(opts[:'body'])
59
- auth_names = ['Apikey']
60
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
61
- :header_params => header_params,
62
- :query_params => query_params,
63
- :form_params => form_params,
64
- :body => post_body,
65
- :auth_names => auth_names,
66
- :return_type => 'PhishingUrlAdvancedResponse')
67
- if @api_client.config.debugging
68
- @api_client.config.logger.debug "API called: PhishingUrlApi#phishing_url_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
- end
70
- return data, status_code, headers
71
- end
72
- # Use AI and deterministic detection to determine if a URL is a phishing threat
73
- # Uses AI and deterministic methods to detect if a URL is a phishing threat.
74
- # @param [Hash] opts the optional parameters
75
- # @option opts [PhishingUrlRequest] :body
76
- # @return [PhishingUrlResponse]
77
- def phishing_url_post(opts = {})
78
- data, _status_code, _headers = phishing_url_post_with_http_info(opts)
79
- data
80
- end
81
-
82
- # Use AI and deterministic detection to determine if a URL is a phishing threat
83
- # Uses AI and deterministic methods to detect if a URL is a phishing threat.
84
- # @param [Hash] opts the optional parameters
85
- # @option opts [PhishingUrlRequest] :body
86
- # @return [Array<(PhishingUrlResponse, Fixnum, Hash)>] PhishingUrlResponse data, response status code and response headers
87
- def phishing_url_post_with_http_info(opts = {})
88
- if @api_client.config.debugging
89
- @api_client.config.logger.debug 'Calling API: PhishingUrlApi.phishing_url_post ...'
90
- end
91
- # resource path
92
- local_var_path = '/phishing/url'
93
-
94
- # query parameters
95
- query_params = {}
96
-
97
- # header parameters
98
- header_params = {}
99
- # HTTP header 'Accept' (if needed)
100
- header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
101
- # HTTP header 'Content-Type'
102
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])
103
-
104
- # form parameters
105
- form_params = {}
106
-
107
- # http body (model)
108
- post_body = @api_client.object_to_http_body(opts[:'body'])
109
- auth_names = ['Apikey']
110
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
111
- :header_params => header_params,
112
- :query_params => query_params,
113
- :form_params => form_params,
114
- :body => post_body,
115
- :auth_names => auth_names,
116
- :return_type => 'PhishingUrlResponse')
117
- if @api_client.config.debugging
118
- @api_client.config.logger.debug "API called: PhishingUrlApi#phishing_url_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
119
- end
120
- return data, status_code, headers
121
- end
122
- end
123
- end
@@ -1,123 +0,0 @@
1
- =begin
2
- #phishingapi
3
-
4
- #Easily and directly scan and block phishing security threats.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.14
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module CloudmersivePhishingDetectionApiClient
16
- class PhishingUrlBatchApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # 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.
23
- # Uses advanced AI and deterministic methods to detect if a URL is a phishing threat.
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [PhishingUrlAdvancedRequestBatch] :body
26
- # @return [PhishingUrlAdvancedResponseBatch]
27
- def phishing_url_advanced_batch_post(opts = {})
28
- data, _status_code, _headers = phishing_url_advanced_batch_post_with_http_info(opts)
29
- data
30
- end
31
-
32
- # 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.
33
- # Uses advanced AI and deterministic methods to detect if a URL is a phishing threat.
34
- # @param [Hash] opts the optional parameters
35
- # @option opts [PhishingUrlAdvancedRequestBatch] :body
36
- # @return [Array<(PhishingUrlAdvancedResponseBatch, Fixnum, Hash)>] PhishingUrlAdvancedResponseBatch data, response status code and response headers
37
- def phishing_url_advanced_batch_post_with_http_info(opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: PhishingUrlBatchApi.phishing_url_advanced_batch_post ...'
40
- end
41
- # resource path
42
- local_var_path = '/phishing/url/advanced/batch'
43
-
44
- # query parameters
45
- query_params = {}
46
-
47
- # header parameters
48
- header_params = {}
49
- # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
51
- # HTTP header 'Content-Type'
52
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])
53
-
54
- # form parameters
55
- form_params = {}
56
-
57
- # http body (model)
58
- post_body = @api_client.object_to_http_body(opts[:'body'])
59
- auth_names = ['Apikey']
60
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
61
- :header_params => header_params,
62
- :query_params => query_params,
63
- :form_params => form_params,
64
- :body => post_body,
65
- :auth_names => auth_names,
66
- :return_type => 'PhishingUrlAdvancedResponseBatch')
67
- if @api_client.config.debugging
68
- @api_client.config.logger.debug "API called: PhishingUrlBatchApi#phishing_url_advanced_batch_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
- end
70
- return data, status_code, headers
71
- end
72
- # Accept multiple urls at oncee and perform AI and deterministic methods to detect if a URL is a phishing threat.
73
- # Uses AI and deterministic methods to detect if a URL is a phishing threat.
74
- # @param [Hash] opts the optional parameters
75
- # @option opts [Array<PhishingUrlRequest>] :body
76
- # @return [PhishingUrlResponseBatch]
77
- def phishing_url_batch_post(opts = {})
78
- data, _status_code, _headers = phishing_url_batch_post_with_http_info(opts)
79
- data
80
- end
81
-
82
- # Accept multiple urls at oncee and perform AI and deterministic methods to detect if a URL is a phishing threat.
83
- # Uses AI and deterministic methods to detect if a URL is a phishing threat.
84
- # @param [Hash] opts the optional parameters
85
- # @option opts [Array<PhishingUrlRequest>] :body
86
- # @return [Array<(PhishingUrlResponseBatch, Fixnum, Hash)>] PhishingUrlResponseBatch data, response status code and response headers
87
- def phishing_url_batch_post_with_http_info(opts = {})
88
- if @api_client.config.debugging
89
- @api_client.config.logger.debug 'Calling API: PhishingUrlBatchApi.phishing_url_batch_post ...'
90
- end
91
- # resource path
92
- local_var_path = '/phishing/url/batch'
93
-
94
- # query parameters
95
- query_params = {}
96
-
97
- # header parameters
98
- header_params = {}
99
- # HTTP header 'Accept' (if needed)
100
- header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
101
- # HTTP header 'Content-Type'
102
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])
103
-
104
- # form parameters
105
- form_params = {}
106
-
107
- # http body (model)
108
- post_body = @api_client.object_to_http_body(opts[:'body'])
109
- auth_names = ['Apikey']
110
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
111
- :header_params => header_params,
112
- :query_params => query_params,
113
- :form_params => form_params,
114
- :body => post_body,
115
- :auth_names => auth_names,
116
- :return_type => 'PhishingUrlResponseBatch')
117
- if @api_client.config.debugging
118
- @api_client.config.logger.debug "API called: PhishingUrlBatchApi#phishing_url_batch_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
119
- end
120
- return data, status_code, headers
121
- end
122
- end
123
- end