whoisfreaks 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -5
- data/docs/AccountApi.md +1 -1
- data/docs/DatabaseFileStatus.md +2 -0
- data/docs/DatabasesThreatFeedApi.md +424 -0
- data/docs/ThreatFeedStatus.md +22 -0
- data/lib/whoisfreaks/api/account_api.rb +1 -1
- data/lib/whoisfreaks/api/databases_threat_feed_api.rb +361 -0
- data/lib/whoisfreaks/models/database_file_status.rb +10 -1
- data/lib/whoisfreaks/models/threat_feed_status.rb +232 -0
- data/lib/whoisfreaks/version.rb +1 -1
- data/lib/whoisfreaks.rb +2 -0
- data/spec/api/databases_threat_feed_api_spec.rb +98 -0
- data/spec/models/database_file_status_spec.rb +6 -0
- data/spec/models/threat_feed_status_spec.rb +48 -0
- metadata +89 -81
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b10d70abb874c7d989baf89b8b9eb10a74129acf54535c00523bde3a980208b5
|
|
4
|
+
data.tar.gz: 2817fd4b30f3f16b7dfe9f99e91935279995533a0803679774a354152cd99556
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68451403f4d65ce9a8c6f27869eb46a98fb0820fd4bf6a4a8bcc0a24cf1c576c14e26846a65cada47b033897d26cd48ec1ad78d42f2965eb8c7545d9243cee7b
|
|
7
|
+
data.tar.gz: cd48b125b1e764dfda520505c7253fa39a5e6096705e034ddd958fd2ad0ad30c7b85a2923991a0f58ea5beb7562d70e5c82a084f712e3396b4cc6cae909b45e1
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ All requests require an `apiKey` query parameter.
|
|
|
17
17
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
18
18
|
|
|
19
19
|
- API version: 1.0.0
|
|
20
|
-
- Package version: 0.
|
|
20
|
+
- Package version: 0.21.0
|
|
21
21
|
- Generator version: 7.11.0
|
|
22
22
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
23
23
|
For more information, please visit [https://whoisfreaks.com](https://whoisfreaks.com)
|
|
@@ -35,16 +35,16 @@ gem build whoisfreaks.gemspec
|
|
|
35
35
|
Then either install the gem locally:
|
|
36
36
|
|
|
37
37
|
```shell
|
|
38
|
-
gem install ./whoisfreaks-0.
|
|
38
|
+
gem install ./whoisfreaks-0.21.0.gem
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
(for development, run `gem install --dev ./whoisfreaks-0.
|
|
41
|
+
(for development, run `gem install --dev ./whoisfreaks-0.21.0.gem` to install the development dependencies)
|
|
42
42
|
|
|
43
43
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
44
44
|
|
|
45
45
|
Finally add this to the Gemfile:
|
|
46
46
|
|
|
47
|
-
gem 'whoisfreaks', '~> 0.
|
|
47
|
+
gem 'whoisfreaks', '~> 0.21.0'
|
|
48
48
|
|
|
49
49
|
### Install from Git
|
|
50
50
|
|
|
@@ -102,7 +102,7 @@ Class | Method | HTTP request | Description
|
|
|
102
102
|
------------ | ------------- | ------------- | -------------
|
|
103
103
|
*WhoisFreaks::ASNWHOISApi* | [**asn_whois**](docs/ASNWHOISApi.md#asn_whois) | **GET** /v2.0/asn-whois | ASN WHOIS Lookup
|
|
104
104
|
*WhoisFreaks::AccountApi* | [**account_usage**](docs/AccountApi.md#account_usage) | **GET** /v1.0/whoisapi/usage | Account Usage
|
|
105
|
-
*WhoisFreaks::AccountApi* | [**database_file_status**](docs/AccountApi.md#database_file_status) | **GET** /v3.
|
|
105
|
+
*WhoisFreaks::AccountApi* | [**database_file_status**](docs/AccountApi.md#database_file_status) | **GET** /v3.4/status | Database File Status (Public)
|
|
106
106
|
*WhoisFreaks::AccountApi* | [**rotate_api_key**](docs/AccountApi.md#rotate_api_key) | **GET** /v1.0/api-key/rotate | Rotate API Key
|
|
107
107
|
*WhoisFreaks::DNSApi* | [**dns_bulk**](docs/DNSApi.md#dns_bulk) | **POST** /v2.0/dns/bulk/live | Bulk DNS Lookup
|
|
108
108
|
*WhoisFreaks::DNSApi* | [**dns_historical**](docs/DNSApi.md#dns_historical) | **GET** /v2.0/dns/historical | Historical DNS Lookup
|
|
@@ -136,6 +136,12 @@ Class | Method | HTTP request | Description
|
|
|
136
136
|
*WhoisFreaks::DatabasesSubdomainsApi* | [**db_subdomains_daily**](docs/DatabasesSubdomainsApi.md#db_subdomains_daily) | **GET** /v3.2/download/dbupdate/daily/subdomains | Subdomains Daily
|
|
137
137
|
*WhoisFreaks::DatabasesSubdomainsApi* | [**db_subdomains_monthly**](docs/DatabasesSubdomainsApi.md#db_subdomains_monthly) | **GET** /v3.2/download/dbupdate/monthly/subdomains | Subdomains Monthly
|
|
138
138
|
*WhoisFreaks::DatabasesSubdomainsApi* | [**db_subdomains_weekly**](docs/DatabasesSubdomainsApi.md#db_subdomains_weekly) | **GET** /v3.2/download/dbupdate/weekly/subdomains | Subdomains Weekly
|
|
139
|
+
*WhoisFreaks::DatabasesThreatFeedApi* | [**download_threat_feed_malware**](docs/DatabasesThreatFeedApi.md#download_threat_feed_malware) | **GET** /v3.4/download/threat-feed/malware | Download the daily malware threat feed (CSV)
|
|
140
|
+
*WhoisFreaks::DatabasesThreatFeedApi* | [**download_threat_feed_malware_sample**](docs/DatabasesThreatFeedApi.md#download_threat_feed_malware_sample) | **GET** /v3.4/download/threat-feed/malware/sample | Download a sample of the malware threat feed (CSV)
|
|
141
|
+
*WhoisFreaks::DatabasesThreatFeedApi* | [**download_threat_feed_phishing**](docs/DatabasesThreatFeedApi.md#download_threat_feed_phishing) | **GET** /v3.4/download/threat-feed/phishing | Download the daily phishing threat feed (CSV)
|
|
142
|
+
*WhoisFreaks::DatabasesThreatFeedApi* | [**download_threat_feed_phishing_sample**](docs/DatabasesThreatFeedApi.md#download_threat_feed_phishing_sample) | **GET** /v3.4/download/threat-feed/phishing/sample | Download a sample of the phishing threat feed (CSV)
|
|
143
|
+
*WhoisFreaks::DatabasesThreatFeedApi* | [**download_threat_feed_spam**](docs/DatabasesThreatFeedApi.md#download_threat_feed_spam) | **GET** /v3.4/download/threat-feed/spam | Download the daily spam threat feed (CSV)
|
|
144
|
+
*WhoisFreaks::DatabasesThreatFeedApi* | [**download_threat_feed_spam_sample**](docs/DatabasesThreatFeedApi.md#download_threat_feed_spam_sample) | **GET** /v3.4/download/threat-feed/spam/sample | Download a sample of the spam threat feed (CSV)
|
|
139
145
|
*WhoisFreaks::DatabasesWHOISApi* | [**db_whois_daily**](docs/DatabasesWHOISApi.md#db_whois_daily) | **GET** /v3.3/download/dbupdate/daily/domains/whois | WHOIS Database Daily
|
|
140
146
|
*WhoisFreaks::DatabasesWHOISApi* | [**db_whois_monthly**](docs/DatabasesWHOISApi.md#db_whois_monthly) | **GET** /v3.3/download/dbupdate/monthly/domains/whois | WHOIS Database Monthly
|
|
141
147
|
*WhoisFreaks::DatabasesWHOISApi* | [**db_whois_weekly**](docs/DatabasesWHOISApi.md#db_whois_weekly) | **GET** /v3.3/download/dbupdate/weekly/domains/whois | WHOIS Database Weekly
|
|
@@ -227,6 +233,7 @@ Class | Method | HTTP request | Description
|
|
|
227
233
|
- [WhoisFreaks::SslUnitInfo](docs/SslUnitInfo.md)
|
|
228
234
|
- [WhoisFreaks::Subdomain](docs/Subdomain.md)
|
|
229
235
|
- [WhoisFreaks::SubdomainsResponse](docs/SubdomainsResponse.md)
|
|
236
|
+
- [WhoisFreaks::ThreatFeedStatus](docs/ThreatFeedStatus.md)
|
|
230
237
|
- [WhoisFreaks::ThreatSource](docs/ThreatSource.md)
|
|
231
238
|
- [WhoisFreaks::TrustSignals](docs/TrustSignals.md)
|
|
232
239
|
- [WhoisFreaks::TyposquattingDomain](docs/TyposquattingDomain.md)
|
data/docs/AccountApi.md
CHANGED
|
@@ -5,7 +5,7 @@ All URIs are relative to *https://api.whoisfreaks.com*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**account_usage**](AccountApi.md#account_usage) | **GET** /v1.0/whoisapi/usage | Account Usage |
|
|
8
|
-
| [**database_file_status**](AccountApi.md#database_file_status) | **GET** /v3.
|
|
8
|
+
| [**database_file_status**](AccountApi.md#database_file_status) | **GET** /v3.4/status | Database File Status (Public) |
|
|
9
9
|
| [**rotate_api_key**](AccountApi.md#rotate_api_key) | **GET** /v1.0/api-key/rotate | Rotate API Key |
|
|
10
10
|
|
|
11
11
|
|
data/docs/DatabaseFileStatus.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **cleaned_expired** | [**DateRangeStatus**](DateRangeStatus.md) | | [optional] |
|
|
10
10
|
| **dropped** | [**DateRangeStatus**](DateRangeStatus.md) | | [optional] |
|
|
11
11
|
| **dropped_with_backlinks** | [**DateRangeStatus**](DateRangeStatus.md) | | [optional] |
|
|
12
|
+
| **threat_feed** | [**ThreatFeedStatus**](ThreatFeedStatus.md) | | [optional] |
|
|
12
13
|
| **database_updates** | [**DatabaseUpdates**](DatabaseUpdates.md) | | [optional] |
|
|
13
14
|
|
|
14
15
|
## Example
|
|
@@ -22,6 +23,7 @@ instance = WhoisFreaks::DatabaseFileStatus.new(
|
|
|
22
23
|
cleaned_expired: null,
|
|
23
24
|
dropped: null,
|
|
24
25
|
dropped_with_backlinks: null,
|
|
26
|
+
threat_feed: null,
|
|
25
27
|
database_updates: null
|
|
26
28
|
)
|
|
27
29
|
```
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
# WhoisFreaks::DatabasesThreatFeedApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.whoisfreaks.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**download_threat_feed_malware**](DatabasesThreatFeedApi.md#download_threat_feed_malware) | **GET** /v3.4/download/threat-feed/malware | Download the daily malware threat feed (CSV) |
|
|
8
|
+
| [**download_threat_feed_malware_sample**](DatabasesThreatFeedApi.md#download_threat_feed_malware_sample) | **GET** /v3.4/download/threat-feed/malware/sample | Download a sample of the malware threat feed (CSV) |
|
|
9
|
+
| [**download_threat_feed_phishing**](DatabasesThreatFeedApi.md#download_threat_feed_phishing) | **GET** /v3.4/download/threat-feed/phishing | Download the daily phishing threat feed (CSV) |
|
|
10
|
+
| [**download_threat_feed_phishing_sample**](DatabasesThreatFeedApi.md#download_threat_feed_phishing_sample) | **GET** /v3.4/download/threat-feed/phishing/sample | Download a sample of the phishing threat feed (CSV) |
|
|
11
|
+
| [**download_threat_feed_spam**](DatabasesThreatFeedApi.md#download_threat_feed_spam) | **GET** /v3.4/download/threat-feed/spam | Download the daily spam threat feed (CSV) |
|
|
12
|
+
| [**download_threat_feed_spam_sample**](DatabasesThreatFeedApi.md#download_threat_feed_spam_sample) | **GET** /v3.4/download/threat-feed/spam/sample | Download a sample of the spam threat feed (CSV) |
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## download_threat_feed_malware
|
|
16
|
+
|
|
17
|
+
> File download_threat_feed_malware(opts)
|
|
18
|
+
|
|
19
|
+
Download the daily malware threat feed (CSV)
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'whoisfreaks'
|
|
26
|
+
# setup authorization
|
|
27
|
+
WhoisFreaks.configure do |config|
|
|
28
|
+
# Configure API key authorization: ApiKeyAuth
|
|
29
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
|
30
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
31
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
api_instance = WhoisFreaks::DatabasesThreatFeedApi.new
|
|
35
|
+
opts = {
|
|
36
|
+
date: 'date_example' # String | Feed date (yyyy-MM-dd); defaults to latest available
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
# Download the daily malware threat feed (CSV)
|
|
41
|
+
result = api_instance.download_threat_feed_malware(opts)
|
|
42
|
+
p result
|
|
43
|
+
rescue WhoisFreaks::ApiError => e
|
|
44
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_malware: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Using the download_threat_feed_malware_with_http_info variant
|
|
49
|
+
|
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
|
51
|
+
|
|
52
|
+
> <Array(File, Integer, Hash)> download_threat_feed_malware_with_http_info(opts)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
begin
|
|
56
|
+
# Download the daily malware threat feed (CSV)
|
|
57
|
+
data, status_code, headers = api_instance.download_threat_feed_malware_with_http_info(opts)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => File
|
|
61
|
+
rescue WhoisFreaks::ApiError => e
|
|
62
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_malware_with_http_info: #{e}"
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **date** | **String** | Feed date (yyyy-MM-dd); defaults to latest available | [optional] |
|
|
71
|
+
|
|
72
|
+
### Return type
|
|
73
|
+
|
|
74
|
+
**File**
|
|
75
|
+
|
|
76
|
+
### Authorization
|
|
77
|
+
|
|
78
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
79
|
+
|
|
80
|
+
### HTTP request headers
|
|
81
|
+
|
|
82
|
+
- **Content-Type**: Not defined
|
|
83
|
+
- **Accept**: application/octet-stream
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## download_threat_feed_malware_sample
|
|
87
|
+
|
|
88
|
+
> File download_threat_feed_malware_sample
|
|
89
|
+
|
|
90
|
+
Download a sample of the malware threat feed (CSV)
|
|
91
|
+
|
|
92
|
+
### Examples
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
require 'time'
|
|
96
|
+
require 'whoisfreaks'
|
|
97
|
+
# setup authorization
|
|
98
|
+
WhoisFreaks.configure do |config|
|
|
99
|
+
# Configure API key authorization: ApiKeyAuth
|
|
100
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
|
101
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
102
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
api_instance = WhoisFreaks::DatabasesThreatFeedApi.new
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
# Download a sample of the malware threat feed (CSV)
|
|
109
|
+
result = api_instance.download_threat_feed_malware_sample
|
|
110
|
+
p result
|
|
111
|
+
rescue WhoisFreaks::ApiError => e
|
|
112
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_malware_sample: #{e}"
|
|
113
|
+
end
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Using the download_threat_feed_malware_sample_with_http_info variant
|
|
117
|
+
|
|
118
|
+
This returns an Array which contains the response data, status code and headers.
|
|
119
|
+
|
|
120
|
+
> <Array(File, Integer, Hash)> download_threat_feed_malware_sample_with_http_info
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
begin
|
|
124
|
+
# Download a sample of the malware threat feed (CSV)
|
|
125
|
+
data, status_code, headers = api_instance.download_threat_feed_malware_sample_with_http_info
|
|
126
|
+
p status_code # => 2xx
|
|
127
|
+
p headers # => { ... }
|
|
128
|
+
p data # => File
|
|
129
|
+
rescue WhoisFreaks::ApiError => e
|
|
130
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_malware_sample_with_http_info: #{e}"
|
|
131
|
+
end
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
This endpoint does not need any parameter.
|
|
137
|
+
|
|
138
|
+
### Return type
|
|
139
|
+
|
|
140
|
+
**File**
|
|
141
|
+
|
|
142
|
+
### Authorization
|
|
143
|
+
|
|
144
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
145
|
+
|
|
146
|
+
### HTTP request headers
|
|
147
|
+
|
|
148
|
+
- **Content-Type**: Not defined
|
|
149
|
+
- **Accept**: application/octet-stream
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## download_threat_feed_phishing
|
|
153
|
+
|
|
154
|
+
> File download_threat_feed_phishing(opts)
|
|
155
|
+
|
|
156
|
+
Download the daily phishing threat feed (CSV)
|
|
157
|
+
|
|
158
|
+
### Examples
|
|
159
|
+
|
|
160
|
+
```ruby
|
|
161
|
+
require 'time'
|
|
162
|
+
require 'whoisfreaks'
|
|
163
|
+
# setup authorization
|
|
164
|
+
WhoisFreaks.configure do |config|
|
|
165
|
+
# Configure API key authorization: ApiKeyAuth
|
|
166
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
|
167
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
168
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
api_instance = WhoisFreaks::DatabasesThreatFeedApi.new
|
|
172
|
+
opts = {
|
|
173
|
+
date: 'date_example' # String | Feed date (yyyy-MM-dd); defaults to latest available
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
begin
|
|
177
|
+
# Download the daily phishing threat feed (CSV)
|
|
178
|
+
result = api_instance.download_threat_feed_phishing(opts)
|
|
179
|
+
p result
|
|
180
|
+
rescue WhoisFreaks::ApiError => e
|
|
181
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_phishing: #{e}"
|
|
182
|
+
end
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Using the download_threat_feed_phishing_with_http_info variant
|
|
186
|
+
|
|
187
|
+
This returns an Array which contains the response data, status code and headers.
|
|
188
|
+
|
|
189
|
+
> <Array(File, Integer, Hash)> download_threat_feed_phishing_with_http_info(opts)
|
|
190
|
+
|
|
191
|
+
```ruby
|
|
192
|
+
begin
|
|
193
|
+
# Download the daily phishing threat feed (CSV)
|
|
194
|
+
data, status_code, headers = api_instance.download_threat_feed_phishing_with_http_info(opts)
|
|
195
|
+
p status_code # => 2xx
|
|
196
|
+
p headers # => { ... }
|
|
197
|
+
p data # => File
|
|
198
|
+
rescue WhoisFreaks::ApiError => e
|
|
199
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_phishing_with_http_info: #{e}"
|
|
200
|
+
end
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Parameters
|
|
204
|
+
|
|
205
|
+
| Name | Type | Description | Notes |
|
|
206
|
+
| ---- | ---- | ----------- | ----- |
|
|
207
|
+
| **date** | **String** | Feed date (yyyy-MM-dd); defaults to latest available | [optional] |
|
|
208
|
+
|
|
209
|
+
### Return type
|
|
210
|
+
|
|
211
|
+
**File**
|
|
212
|
+
|
|
213
|
+
### Authorization
|
|
214
|
+
|
|
215
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
216
|
+
|
|
217
|
+
### HTTP request headers
|
|
218
|
+
|
|
219
|
+
- **Content-Type**: Not defined
|
|
220
|
+
- **Accept**: application/octet-stream
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
## download_threat_feed_phishing_sample
|
|
224
|
+
|
|
225
|
+
> File download_threat_feed_phishing_sample
|
|
226
|
+
|
|
227
|
+
Download a sample of the phishing threat feed (CSV)
|
|
228
|
+
|
|
229
|
+
### Examples
|
|
230
|
+
|
|
231
|
+
```ruby
|
|
232
|
+
require 'time'
|
|
233
|
+
require 'whoisfreaks'
|
|
234
|
+
# setup authorization
|
|
235
|
+
WhoisFreaks.configure do |config|
|
|
236
|
+
# Configure API key authorization: ApiKeyAuth
|
|
237
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
|
238
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
239
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
api_instance = WhoisFreaks::DatabasesThreatFeedApi.new
|
|
243
|
+
|
|
244
|
+
begin
|
|
245
|
+
# Download a sample of the phishing threat feed (CSV)
|
|
246
|
+
result = api_instance.download_threat_feed_phishing_sample
|
|
247
|
+
p result
|
|
248
|
+
rescue WhoisFreaks::ApiError => e
|
|
249
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_phishing_sample: #{e}"
|
|
250
|
+
end
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
#### Using the download_threat_feed_phishing_sample_with_http_info variant
|
|
254
|
+
|
|
255
|
+
This returns an Array which contains the response data, status code and headers.
|
|
256
|
+
|
|
257
|
+
> <Array(File, Integer, Hash)> download_threat_feed_phishing_sample_with_http_info
|
|
258
|
+
|
|
259
|
+
```ruby
|
|
260
|
+
begin
|
|
261
|
+
# Download a sample of the phishing threat feed (CSV)
|
|
262
|
+
data, status_code, headers = api_instance.download_threat_feed_phishing_sample_with_http_info
|
|
263
|
+
p status_code # => 2xx
|
|
264
|
+
p headers # => { ... }
|
|
265
|
+
p data # => File
|
|
266
|
+
rescue WhoisFreaks::ApiError => e
|
|
267
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_phishing_sample_with_http_info: #{e}"
|
|
268
|
+
end
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Parameters
|
|
272
|
+
|
|
273
|
+
This endpoint does not need any parameter.
|
|
274
|
+
|
|
275
|
+
### Return type
|
|
276
|
+
|
|
277
|
+
**File**
|
|
278
|
+
|
|
279
|
+
### Authorization
|
|
280
|
+
|
|
281
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
282
|
+
|
|
283
|
+
### HTTP request headers
|
|
284
|
+
|
|
285
|
+
- **Content-Type**: Not defined
|
|
286
|
+
- **Accept**: application/octet-stream
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
## download_threat_feed_spam
|
|
290
|
+
|
|
291
|
+
> File download_threat_feed_spam(opts)
|
|
292
|
+
|
|
293
|
+
Download the daily spam threat feed (CSV)
|
|
294
|
+
|
|
295
|
+
### Examples
|
|
296
|
+
|
|
297
|
+
```ruby
|
|
298
|
+
require 'time'
|
|
299
|
+
require 'whoisfreaks'
|
|
300
|
+
# setup authorization
|
|
301
|
+
WhoisFreaks.configure do |config|
|
|
302
|
+
# Configure API key authorization: ApiKeyAuth
|
|
303
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
|
304
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
305
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
api_instance = WhoisFreaks::DatabasesThreatFeedApi.new
|
|
309
|
+
opts = {
|
|
310
|
+
date: 'date_example' # String | Feed date (yyyy-MM-dd); defaults to latest available
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
begin
|
|
314
|
+
# Download the daily spam threat feed (CSV)
|
|
315
|
+
result = api_instance.download_threat_feed_spam(opts)
|
|
316
|
+
p result
|
|
317
|
+
rescue WhoisFreaks::ApiError => e
|
|
318
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_spam: #{e}"
|
|
319
|
+
end
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Using the download_threat_feed_spam_with_http_info variant
|
|
323
|
+
|
|
324
|
+
This returns an Array which contains the response data, status code and headers.
|
|
325
|
+
|
|
326
|
+
> <Array(File, Integer, Hash)> download_threat_feed_spam_with_http_info(opts)
|
|
327
|
+
|
|
328
|
+
```ruby
|
|
329
|
+
begin
|
|
330
|
+
# Download the daily spam threat feed (CSV)
|
|
331
|
+
data, status_code, headers = api_instance.download_threat_feed_spam_with_http_info(opts)
|
|
332
|
+
p status_code # => 2xx
|
|
333
|
+
p headers # => { ... }
|
|
334
|
+
p data # => File
|
|
335
|
+
rescue WhoisFreaks::ApiError => e
|
|
336
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_spam_with_http_info: #{e}"
|
|
337
|
+
end
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Parameters
|
|
341
|
+
|
|
342
|
+
| Name | Type | Description | Notes |
|
|
343
|
+
| ---- | ---- | ----------- | ----- |
|
|
344
|
+
| **date** | **String** | Feed date (yyyy-MM-dd); defaults to latest available | [optional] |
|
|
345
|
+
|
|
346
|
+
### Return type
|
|
347
|
+
|
|
348
|
+
**File**
|
|
349
|
+
|
|
350
|
+
### Authorization
|
|
351
|
+
|
|
352
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
353
|
+
|
|
354
|
+
### HTTP request headers
|
|
355
|
+
|
|
356
|
+
- **Content-Type**: Not defined
|
|
357
|
+
- **Accept**: application/octet-stream
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
## download_threat_feed_spam_sample
|
|
361
|
+
|
|
362
|
+
> File download_threat_feed_spam_sample
|
|
363
|
+
|
|
364
|
+
Download a sample of the spam threat feed (CSV)
|
|
365
|
+
|
|
366
|
+
### Examples
|
|
367
|
+
|
|
368
|
+
```ruby
|
|
369
|
+
require 'time'
|
|
370
|
+
require 'whoisfreaks'
|
|
371
|
+
# setup authorization
|
|
372
|
+
WhoisFreaks.configure do |config|
|
|
373
|
+
# Configure API key authorization: ApiKeyAuth
|
|
374
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
|
375
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
376
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
api_instance = WhoisFreaks::DatabasesThreatFeedApi.new
|
|
380
|
+
|
|
381
|
+
begin
|
|
382
|
+
# Download a sample of the spam threat feed (CSV)
|
|
383
|
+
result = api_instance.download_threat_feed_spam_sample
|
|
384
|
+
p result
|
|
385
|
+
rescue WhoisFreaks::ApiError => e
|
|
386
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_spam_sample: #{e}"
|
|
387
|
+
end
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
#### Using the download_threat_feed_spam_sample_with_http_info variant
|
|
391
|
+
|
|
392
|
+
This returns an Array which contains the response data, status code and headers.
|
|
393
|
+
|
|
394
|
+
> <Array(File, Integer, Hash)> download_threat_feed_spam_sample_with_http_info
|
|
395
|
+
|
|
396
|
+
```ruby
|
|
397
|
+
begin
|
|
398
|
+
# Download a sample of the spam threat feed (CSV)
|
|
399
|
+
data, status_code, headers = api_instance.download_threat_feed_spam_sample_with_http_info
|
|
400
|
+
p status_code # => 2xx
|
|
401
|
+
p headers # => { ... }
|
|
402
|
+
p data # => File
|
|
403
|
+
rescue WhoisFreaks::ApiError => e
|
|
404
|
+
puts "Error when calling DatabasesThreatFeedApi->download_threat_feed_spam_sample_with_http_info: #{e}"
|
|
405
|
+
end
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Parameters
|
|
409
|
+
|
|
410
|
+
This endpoint does not need any parameter.
|
|
411
|
+
|
|
412
|
+
### Return type
|
|
413
|
+
|
|
414
|
+
**File**
|
|
415
|
+
|
|
416
|
+
### Authorization
|
|
417
|
+
|
|
418
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
419
|
+
|
|
420
|
+
### HTTP request headers
|
|
421
|
+
|
|
422
|
+
- **Content-Type**: Not defined
|
|
423
|
+
- **Accept**: application/octet-stream
|
|
424
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# WhoisFreaks::ThreatFeedStatus
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **phishing** | [**DateRangeStatus**](DateRangeStatus.md) | | [optional] |
|
|
8
|
+
| **malware** | [**DateRangeStatus**](DateRangeStatus.md) | | [optional] |
|
|
9
|
+
| **spam** | [**DateRangeStatus**](DateRangeStatus.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'whoisfreaks'
|
|
15
|
+
|
|
16
|
+
instance = WhoisFreaks::ThreatFeedStatus.new(
|
|
17
|
+
phishing: null,
|
|
18
|
+
malware: null,
|
|
19
|
+
spam: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -94,7 +94,7 @@ module WhoisFreaks
|
|
|
94
94
|
@api_client.config.logger.debug 'Calling API: AccountApi.database_file_status ...'
|
|
95
95
|
end
|
|
96
96
|
# resource path
|
|
97
|
-
local_var_path = '/v3.
|
|
97
|
+
local_var_path = '/v3.4/status'
|
|
98
98
|
|
|
99
99
|
# query parameters
|
|
100
100
|
query_params = opts[:query_params] || {}
|