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.
- checksums.yaml +4 -4
- data/README.md +19 -21
- data/cloudmersive-phishing-detection-api-client.gemspec +1 -1
- data/docs/AdvancedEmailDetectionRequest.md +14 -0
- data/docs/PhishingDetectionAdvancedRequest.md +9 -0
- data/docs/PhishingDetectionAdvancedResponse.md +10 -0
- data/docs/PhishingDetectionApi.md +228 -0
- data/docs/PhishingDetectionEmailAdvancedResponse.md +17 -0
- data/docs/PhishingDetectionResponse.md +8 -0
- data/lib/cloudmersive-phishing-detection-api-client/api/phishing_detection_api.rb +223 -0
- data/lib/cloudmersive-phishing-detection-api-client/api_client.rb +1 -1
- data/lib/cloudmersive-phishing-detection-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-phishing-detection-api-client/configuration.rb +1 -1
- data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_advanced_request.rb → advanced_email_detection_request.rb} +72 -46
- data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_advanced_response_batch.rb → phishing_detection_advanced_request.rb} +18 -20
- data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_response_batch.rb → phishing_detection_advanced_response.rb} +22 -14
- data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_response.rb → phishing_detection_email_advanced_response.rb} +80 -40
- data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_request.rb → phishing_detection_response.rb} +11 -16
- data/lib/cloudmersive-phishing-detection-api-client/version.rb +2 -2
- data/lib/cloudmersive-phishing-detection-api-client.rb +7 -10
- data/spec/api/phishing_detection_api_spec.rb +81 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/{phishing_url_response_spec.rb → advanced_email_detection_request_spec.rb} +19 -13
- data/spec/models/{phishing_url_advanced_response_batch_spec.rb → phishing_detection_advanced_request_spec.rb} +9 -9
- data/spec/models/{phishing_url_advanced_request_spec.rb → phishing_detection_advanced_response_spec.rb} +10 -10
- data/spec/models/{phishing_url_advanced_response_spec.rb → phishing_detection_email_advanced_response_spec.rb} +16 -22
- data/spec/models/{phishing_url_request_spec.rb → phishing_detection_response_spec.rb} +8 -8
- data/spec/spec_helper.rb +1 -1
- metadata +20 -29
- data/docs/PhishingUrlAdvancedRequest.md +0 -10
- data/docs/PhishingUrlAdvancedRequestBatch.md +0 -10
- data/docs/PhishingUrlAdvancedResponse.md +0 -18
- data/docs/PhishingUrlAdvancedResponseBatch.md +0 -9
- data/docs/PhishingUrlApi.md +0 -120
- data/docs/PhishingUrlBatchApi.md +0 -120
- data/docs/PhishingUrlRequest.md +0 -8
- data/docs/PhishingUrlResponse.md +0 -13
- data/docs/PhishingUrlResponseBatch.md +0 -9
- data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_api.rb +0 -123
- data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_batch_api.rb +0 -123
- data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_request_batch.rb +0 -217
- data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_response.rb +0 -286
- data/spec/api/phishing_url_api_spec.rb +0 -59
- data/spec/api/phishing_url_batch_api_spec.rb +0 -59
- data/spec/models/phishing_url_advanced_request_batch_spec.rb +0 -53
- data/spec/models/phishing_url_response_batch_spec.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65747f90d512cab686795b33bc37eb8e7a0049da707291605d9069a31ce71e85
|
4
|
+
data.tar.gz: 948d142f3693b5b9587b90522b09f16177db24e5f016ce89dea97515c01d537e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03d817eb09b2d9ea6b0a788fbfe62c256059a83a197059f028b8e21cf1c42f03bd493d1ebdb5706e102a2957da7d7eac5bb89ba3ce3b44bbeeade1f7b696ed5e
|
7
|
+
data.tar.gz: 8c2ba82aaa6976808eba44ba20c58196215e3f0983fd1b0787bdbad3e31cad25eb89b0ba5004194fd4f43e00c17dd9eacba22af142e0d569e1a4ea86ac4bae1a
|
data/README.md
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
CloudmersivePhishingDetectionApiClient - the Ruby gem for the phishingapi
|
4
4
|
|
5
|
-
Easily and directly scan and block phishing security threats.
|
5
|
+
Easily and directly scan and block phishing security threats in input.
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 2.2.
|
10
|
+
- Package version: 2.2.1
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-phishing-detection-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-phishing-detection-api-client-2.2.
|
26
|
+
gem install ./cloudmersive-phishing-detection-api-client-2.2.1.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.1.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-phishing-detection-api-client', '~> 2.2.
|
34
|
+
gem 'cloudmersive-phishing-detection-api-client', '~> 2.2.1'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -62,18 +62,18 @@ CloudmersivePhishingDetectionApiClient.configure do |config|
|
|
62
62
|
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
63
|
end
|
64
64
|
|
65
|
-
api_instance = CloudmersivePhishingDetectionApiClient::
|
65
|
+
api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
|
66
66
|
|
67
67
|
opts = {
|
68
|
-
body: CloudmersivePhishingDetectionApiClient::
|
68
|
+
body: CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest.new # AdvancedEmailDetectionRequest | Phishing detection request
|
69
69
|
}
|
70
70
|
|
71
71
|
begin
|
72
|
-
#
|
73
|
-
result = api_instance.
|
72
|
+
#Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
73
|
+
result = api_instance.phishing_detect_email_advanced_post(opts)
|
74
74
|
p result
|
75
75
|
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
|
76
|
-
puts "Exception when calling
|
76
|
+
puts "Exception when calling PhishingDetectionApi->phishing_detect_email_advanced_post: #{e}"
|
77
77
|
end
|
78
78
|
|
79
79
|
```
|
@@ -84,21 +84,19 @@ All URIs are relative to *https://localhost*
|
|
84
84
|
|
85
85
|
Class | Method | HTTP request | Description
|
86
86
|
------------ | ------------- | ------------- | -------------
|
87
|
-
*CloudmersivePhishingDetectionApiClient::
|
88
|
-
*CloudmersivePhishingDetectionApiClient::
|
89
|
-
*CloudmersivePhishingDetectionApiClient::
|
90
|
-
*CloudmersivePhishingDetectionApiClient::
|
87
|
+
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_email_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_email_advanced_post) | **POST** /phishing/detect/email/advanced | Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
88
|
+
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_file_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_file_advanced_post) | **POST** /phishing/detect/file/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
89
|
+
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_file_post**](docs/PhishingDetectionApi.md#phishing_detect_file_post) | **POST** /phishing/detect/file | Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
90
|
+
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_text_string_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_text_string_advanced_post) | **POST** /phishing/detect/text-string/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
91
91
|
|
92
92
|
|
93
93
|
## Documentation for Models
|
94
94
|
|
95
|
-
- [CloudmersivePhishingDetectionApiClient::
|
96
|
-
- [CloudmersivePhishingDetectionApiClient::
|
97
|
-
- [CloudmersivePhishingDetectionApiClient::
|
98
|
-
- [CloudmersivePhishingDetectionApiClient::
|
99
|
-
- [CloudmersivePhishingDetectionApiClient::
|
100
|
-
- [CloudmersivePhishingDetectionApiClient::PhishingUrlResponse](docs/PhishingUrlResponse.md)
|
101
|
-
- [CloudmersivePhishingDetectionApiClient::PhishingUrlResponseBatch](docs/PhishingUrlResponseBatch.md)
|
95
|
+
- [CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest](docs/AdvancedEmailDetectionRequest.md)
|
96
|
+
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedRequest](docs/PhishingDetectionAdvancedRequest.md)
|
97
|
+
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedResponse](docs/PhishingDetectionAdvancedResponse.md)
|
98
|
+
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionEmailAdvancedResponse](docs/PhishingDetectionEmailAdvancedResponse.md)
|
99
|
+
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionResponse](docs/PhishingDetectionResponse.md)
|
102
100
|
|
103
101
|
|
104
102
|
## Documentation for Authorization
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**from_email_address** | **String** | Email address of the sender | [optional]
|
7
|
+
**to_email_address** | **String** | Email address of the recipient | [optional]
|
8
|
+
**subject** | **String** | Subject of the email | [optional]
|
9
|
+
**html_body** | **String** | Body of the email in HTML, or text | [optional]
|
10
|
+
**allow_low_reputation_senders** | **BOOLEAN** | Allow email from low reputation senders and domains | [optional]
|
11
|
+
**allow_sanctioned** | **BOOLEAN** | True to allow sanctioned countries and certain known sanctioned entities, false otherwise (default) | [optional]
|
12
|
+
**input_email_file** | **String** | | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**input_string** | **String** | Input text string to detect phishing against | [optional]
|
7
|
+
**model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
|
7
|
+
**phishing_risk_level** | **Float** | Overall phishing risk level between 0.0 and 1.0 | [optional]
|
8
|
+
**analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::PhishingDetectionApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://localhost*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**phishing_detect_email_advanced_post**](PhishingDetectionApi.md#phishing_detect_email_advanced_post) | **POST** /phishing/detect/email/advanced | Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
8
|
+
[**phishing_detect_file_advanced_post**](PhishingDetectionApi.md#phishing_detect_file_advanced_post) | **POST** /phishing/detect/file/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
9
|
+
[**phishing_detect_file_post**](PhishingDetectionApi.md#phishing_detect_file_post) | **POST** /phishing/detect/file | Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
10
|
+
[**phishing_detect_text_string_advanced_post**](PhishingDetectionApi.md#phishing_detect_text_string_advanced_post) | **POST** /phishing/detect/text-string/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
11
|
+
|
12
|
+
|
13
|
+
# **phishing_detect_email_advanced_post**
|
14
|
+
> PhishingDetectionEmailAdvancedResponse phishing_detect_email_advanced_post(opts)
|
15
|
+
|
16
|
+
Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
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::PhishingDetectionApi.new
|
31
|
+
|
32
|
+
opts = {
|
33
|
+
body: CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest.new # AdvancedEmailDetectionRequest | Phishing detection request
|
34
|
+
}
|
35
|
+
|
36
|
+
begin
|
37
|
+
#Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
38
|
+
result = api_instance.phishing_detect_email_advanced_post(opts)
|
39
|
+
p result
|
40
|
+
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
|
41
|
+
puts "Exception when calling PhishingDetectionApi->phishing_detect_email_advanced_post: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
Name | Type | Description | Notes
|
48
|
+
------------- | ------------- | ------------- | -------------
|
49
|
+
**body** | [**AdvancedEmailDetectionRequest**](AdvancedEmailDetectionRequest.md)| Phishing detection request | [optional]
|
50
|
+
|
51
|
+
### Return type
|
52
|
+
|
53
|
+
[**PhishingDetectionEmailAdvancedResponse**](PhishingDetectionEmailAdvancedResponse.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
|
62
|
+
- **Accept**: text/plain, application/json, text/json
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# **phishing_detect_file_advanced_post**
|
67
|
+
> PhishingDetectionAdvancedResponse phishing_detect_file_advanced_post(opts)
|
68
|
+
|
69
|
+
Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
70
|
+
|
71
|
+
### Example
|
72
|
+
```ruby
|
73
|
+
# load the gem
|
74
|
+
require 'cloudmersive-phishing-detection-api-client'
|
75
|
+
# setup authorization
|
76
|
+
CloudmersivePhishingDetectionApiClient.configure do |config|
|
77
|
+
# Configure API key authorization: Apikey
|
78
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
79
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
80
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
81
|
+
end
|
82
|
+
|
83
|
+
api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
|
84
|
+
|
85
|
+
opts = {
|
86
|
+
model: 'Advanced', # String |
|
87
|
+
input_file: File.new('/path/to/file.txt') # File |
|
88
|
+
}
|
89
|
+
|
90
|
+
begin
|
91
|
+
#Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
92
|
+
result = api_instance.phishing_detect_file_advanced_post(opts)
|
93
|
+
p result
|
94
|
+
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
|
95
|
+
puts "Exception when calling PhishingDetectionApi->phishing_detect_file_advanced_post: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
Name | Type | Description | Notes
|
102
|
+
------------- | ------------- | ------------- | -------------
|
103
|
+
**model** | **String**| | [optional] [default to Advanced]
|
104
|
+
**input_file** | **File**| | [optional]
|
105
|
+
|
106
|
+
### Return type
|
107
|
+
|
108
|
+
[**PhishingDetectionAdvancedResponse**](PhishingDetectionAdvancedResponse.md)
|
109
|
+
|
110
|
+
### Authorization
|
111
|
+
|
112
|
+
[Apikey](../README.md#Apikey)
|
113
|
+
|
114
|
+
### HTTP request headers
|
115
|
+
|
116
|
+
- **Content-Type**: multipart/form-data
|
117
|
+
- **Accept**: text/plain, application/json, text/json
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
# **phishing_detect_file_post**
|
122
|
+
> PhishingDetectionResponse phishing_detect_file_post(opts)
|
123
|
+
|
124
|
+
Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
125
|
+
|
126
|
+
### Example
|
127
|
+
```ruby
|
128
|
+
# load the gem
|
129
|
+
require 'cloudmersive-phishing-detection-api-client'
|
130
|
+
# setup authorization
|
131
|
+
CloudmersivePhishingDetectionApiClient.configure do |config|
|
132
|
+
# Configure API key authorization: Apikey
|
133
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
134
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
135
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
136
|
+
end
|
137
|
+
|
138
|
+
api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
|
139
|
+
|
140
|
+
opts = {
|
141
|
+
model: 'Advanced', # String | Model to use; default setting is Advanced
|
142
|
+
input_file: File.new('/path/to/file.txt') # File |
|
143
|
+
}
|
144
|
+
|
145
|
+
begin
|
146
|
+
#Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
147
|
+
result = api_instance.phishing_detect_file_post(opts)
|
148
|
+
p result
|
149
|
+
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
|
150
|
+
puts "Exception when calling PhishingDetectionApi->phishing_detect_file_post: #{e}"
|
151
|
+
end
|
152
|
+
```
|
153
|
+
|
154
|
+
### Parameters
|
155
|
+
|
156
|
+
Name | Type | Description | Notes
|
157
|
+
------------- | ------------- | ------------- | -------------
|
158
|
+
**model** | **String**| Model to use; default setting is Advanced | [optional] [default to Advanced]
|
159
|
+
**input_file** | **File**| | [optional]
|
160
|
+
|
161
|
+
### Return type
|
162
|
+
|
163
|
+
[**PhishingDetectionResponse**](PhishingDetectionResponse.md)
|
164
|
+
|
165
|
+
### Authorization
|
166
|
+
|
167
|
+
[Apikey](../README.md#Apikey)
|
168
|
+
|
169
|
+
### HTTP request headers
|
170
|
+
|
171
|
+
- **Content-Type**: multipart/form-data
|
172
|
+
- **Accept**: text/plain, application/json, text/json
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
# **phishing_detect_text_string_advanced_post**
|
177
|
+
> PhishingDetectionAdvancedResponse phishing_detect_text_string_advanced_post(opts)
|
178
|
+
|
179
|
+
Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
180
|
+
|
181
|
+
### Example
|
182
|
+
```ruby
|
183
|
+
# load the gem
|
184
|
+
require 'cloudmersive-phishing-detection-api-client'
|
185
|
+
# setup authorization
|
186
|
+
CloudmersivePhishingDetectionApiClient.configure do |config|
|
187
|
+
# Configure API key authorization: Apikey
|
188
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
189
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
190
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
191
|
+
end
|
192
|
+
|
193
|
+
api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
|
194
|
+
|
195
|
+
opts = {
|
196
|
+
body: CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedRequest.new # PhishingDetectionAdvancedRequest | Phishing detection request
|
197
|
+
}
|
198
|
+
|
199
|
+
begin
|
200
|
+
#Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
201
|
+
result = api_instance.phishing_detect_text_string_advanced_post(opts)
|
202
|
+
p result
|
203
|
+
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
|
204
|
+
puts "Exception when calling PhishingDetectionApi->phishing_detect_text_string_advanced_post: #{e}"
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
208
|
+
### Parameters
|
209
|
+
|
210
|
+
Name | Type | Description | Notes
|
211
|
+
------------- | ------------- | ------------- | -------------
|
212
|
+
**body** | [**PhishingDetectionAdvancedRequest**](PhishingDetectionAdvancedRequest.md)| Phishing detection request | [optional]
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
[**PhishingDetectionAdvancedResponse**](PhishingDetectionAdvancedResponse.md)
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
[Apikey](../README.md#Apikey)
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: application/json, text/json, application/*+json
|
225
|
+
- **Accept**: text/plain, application/json, text/json
|
226
|
+
|
227
|
+
|
228
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::PhishingDetectionEmailAdvancedResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
|
7
|
+
**phishing_risk_level** | **Float** | Overall phishing risk level between 0.0 and 1.0 | [optional]
|
8
|
+
**spam_risk_level** | **Float** | Overall phishing spam level between 0.0 and 1.0 | [optional]
|
9
|
+
**contains_low_reputation_sender** | **BOOLEAN** | True if the input email is from a low reputation sender | [optional]
|
10
|
+
**contains_phishing** | **BOOLEAN** | True if the input email contains phishing threat risks, false otherwise | [optional]
|
11
|
+
**contains_spam** | **BOOLEAN** | True if the email contains phishing threat risks, false otherwise | [optional]
|
12
|
+
**contains_unsolicited_sales** | **BOOLEAN** | True if the input email contains unsolicited sales, false otherwise | [optional]
|
13
|
+
**contains_promotional_content** | **BOOLEAN** | True if the input email contains promotional content, false otherwise | [optional]
|
14
|
+
**contains_phishing_attempt** | **BOOLEAN** | True if the input email contains a phishing attempt, false otherwise | [optional]
|
15
|
+
**analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::PhishingDetectionResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,223 @@
|
|
1
|
+
=begin
|
2
|
+
#phishingapi
|
3
|
+
|
4
|
+
#Easily and directly scan and block phishing security threats in input.
|
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 PhishingDetectionApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [AdvancedEmailDetectionRequest] :body Phishing detection request
|
25
|
+
# @return [PhishingDetectionEmailAdvancedResponse]
|
26
|
+
def phishing_detect_email_advanced_post(opts = {})
|
27
|
+
data, _status_code, _headers = phishing_detect_email_advanced_post_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Perform advanced AI phishing detection and classification against input email. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [AdvancedEmailDetectionRequest] :body Phishing detection request
|
34
|
+
# @return [Array<(PhishingDetectionEmailAdvancedResponse, Fixnum, Hash)>] PhishingDetectionEmailAdvancedResponse data, response status code and response headers
|
35
|
+
def phishing_detect_email_advanced_post_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_email_advanced_post ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/phishing/detect/email/advanced'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
49
|
+
# HTTP header 'Content-Type'
|
50
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
51
|
+
|
52
|
+
# form parameters
|
53
|
+
form_params = {}
|
54
|
+
|
55
|
+
# http body (model)
|
56
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
57
|
+
auth_names = ['Apikey']
|
58
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
59
|
+
:header_params => header_params,
|
60
|
+
:query_params => query_params,
|
61
|
+
:form_params => form_params,
|
62
|
+
:body => post_body,
|
63
|
+
:auth_names => auth_names,
|
64
|
+
:return_type => 'PhishingDetectionEmailAdvancedResponse')
|
65
|
+
if @api_client.config.debugging
|
66
|
+
@api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_email_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
67
|
+
end
|
68
|
+
return data, status_code, headers
|
69
|
+
end
|
70
|
+
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
71
|
+
# @param [Hash] opts the optional parameters
|
72
|
+
# @option opts [String] :model (default to Advanced)
|
73
|
+
# @option opts [File] :input_file
|
74
|
+
# @return [PhishingDetectionAdvancedResponse]
|
75
|
+
def phishing_detect_file_advanced_post(opts = {})
|
76
|
+
data, _status_code, _headers = phishing_detect_file_advanced_post_with_http_info(opts)
|
77
|
+
data
|
78
|
+
end
|
79
|
+
|
80
|
+
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @option opts [String] :model
|
83
|
+
# @option opts [File] :input_file
|
84
|
+
# @return [Array<(PhishingDetectionAdvancedResponse, Fixnum, Hash)>] PhishingDetectionAdvancedResponse data, response status code and response headers
|
85
|
+
def phishing_detect_file_advanced_post_with_http_info(opts = {})
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_file_advanced_post ...'
|
88
|
+
end
|
89
|
+
# resource path
|
90
|
+
local_var_path = '/phishing/detect/file/advanced'
|
91
|
+
|
92
|
+
# query parameters
|
93
|
+
query_params = {}
|
94
|
+
|
95
|
+
# header parameters
|
96
|
+
header_params = {}
|
97
|
+
# HTTP header 'Accept' (if needed)
|
98
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
99
|
+
# HTTP header 'Content-Type'
|
100
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
101
|
+
header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
|
102
|
+
|
103
|
+
# form parameters
|
104
|
+
form_params = {}
|
105
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
106
|
+
|
107
|
+
# http body (model)
|
108
|
+
post_body = nil
|
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 => 'PhishingDetectionAdvancedResponse')
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_file_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
119
|
+
end
|
120
|
+
return data, status_code, headers
|
121
|
+
end
|
122
|
+
# Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
123
|
+
# @param [Hash] opts the optional parameters
|
124
|
+
# @option opts [String] :model Model to use; default setting is Advanced (default to Advanced)
|
125
|
+
# @option opts [File] :input_file
|
126
|
+
# @return [PhishingDetectionResponse]
|
127
|
+
def phishing_detect_file_post(opts = {})
|
128
|
+
data, _status_code, _headers = phishing_detect_file_post_with_http_info(opts)
|
129
|
+
data
|
130
|
+
end
|
131
|
+
|
132
|
+
# Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @option opts [String] :model Model to use; default setting is Advanced
|
135
|
+
# @option opts [File] :input_file
|
136
|
+
# @return [Array<(PhishingDetectionResponse, Fixnum, Hash)>] PhishingDetectionResponse data, response status code and response headers
|
137
|
+
def phishing_detect_file_post_with_http_info(opts = {})
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_file_post ...'
|
140
|
+
end
|
141
|
+
# resource path
|
142
|
+
local_var_path = '/phishing/detect/file'
|
143
|
+
|
144
|
+
# query parameters
|
145
|
+
query_params = {}
|
146
|
+
|
147
|
+
# header parameters
|
148
|
+
header_params = {}
|
149
|
+
# HTTP header 'Accept' (if needed)
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
151
|
+
# HTTP header 'Content-Type'
|
152
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
153
|
+
header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
|
154
|
+
|
155
|
+
# form parameters
|
156
|
+
form_params = {}
|
157
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
158
|
+
|
159
|
+
# http body (model)
|
160
|
+
post_body = nil
|
161
|
+
auth_names = ['Apikey']
|
162
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
163
|
+
:header_params => header_params,
|
164
|
+
:query_params => query_params,
|
165
|
+
:form_params => form_params,
|
166
|
+
:body => post_body,
|
167
|
+
:auth_names => auth_names,
|
168
|
+
:return_type => 'PhishingDetectionResponse')
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
171
|
+
end
|
172
|
+
return data, status_code, headers
|
173
|
+
end
|
174
|
+
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [PhishingDetectionAdvancedRequest] :body Phishing detection request
|
177
|
+
# @return [PhishingDetectionAdvancedResponse]
|
178
|
+
def phishing_detect_text_string_advanced_post(opts = {})
|
179
|
+
data, _status_code, _headers = phishing_detect_text_string_advanced_post_with_http_info(opts)
|
180
|
+
data
|
181
|
+
end
|
182
|
+
|
183
|
+
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [PhishingDetectionAdvancedRequest] :body Phishing detection request
|
186
|
+
# @return [Array<(PhishingDetectionAdvancedResponse, Fixnum, Hash)>] PhishingDetectionAdvancedResponse data, response status code and response headers
|
187
|
+
def phishing_detect_text_string_advanced_post_with_http_info(opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_text_string_advanced_post ...'
|
190
|
+
end
|
191
|
+
# resource path
|
192
|
+
local_var_path = '/phishing/detect/text-string/advanced'
|
193
|
+
|
194
|
+
# query parameters
|
195
|
+
query_params = {}
|
196
|
+
|
197
|
+
# header parameters
|
198
|
+
header_params = {}
|
199
|
+
# HTTP header 'Accept' (if needed)
|
200
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
201
|
+
# HTTP header 'Content-Type'
|
202
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
203
|
+
|
204
|
+
# form parameters
|
205
|
+
form_params = {}
|
206
|
+
|
207
|
+
# http body (model)
|
208
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
209
|
+
auth_names = ['Apikey']
|
210
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => 'PhishingDetectionAdvancedResponse')
|
217
|
+
if @api_client.config.debugging
|
218
|
+
@api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_text_string_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
|
+
end
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|