vpndetection 1.5.0 → 2.0.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 +2 -2
- data/lib/vpndetection/api/{database_api.rb → database_wire_api.rb} +33 -33
- data/lib/vpndetection/api/{lookup_api.rb → lookup_wire_api.rb} +7 -7
- data/lib/vpndetection/api_client.rb +2 -2
- data/lib/vpndetection/api_error.rb +2 -2
- data/lib/vpndetection/api_model_base.rb +2 -2
- data/lib/vpndetection/client.rb +1 -1
- data/lib/vpndetection/configuration.rb +2 -2
- data/lib/vpndetection/{database.rb → database_api.rb} +5 -5
- data/lib/vpndetection/models/class_detail.rb +2 -2
- data/lib/vpndetection/models/{licensed_dataset.rb → database.rb} +6 -6
- data/lib/vpndetection/models/{dataset_checksums_response.rb → database_checksums_response.rb} +6 -6
- data/lib/vpndetection/models/{dataset_format_size.rb → database_format_size.rb} +5 -5
- data/lib/vpndetection/models/{dataset_list.rb → database_list.rb} +22 -22
- data/lib/vpndetection/models/{dataset_metadata.rb → database_metadata.rb} +6 -6
- data/lib/vpndetection/models/{dataset_metadata_column.rb → database_metadata_column.rb} +5 -5
- data/lib/vpndetection/models/{licensed_version.rb → database_version.rb} +7 -7
- data/lib/vpndetection/models/{dataset_checksums.rb → db_checksums.rb} +74 -5
- data/lib/vpndetection/models/download.rb +2 -2
- data/lib/vpndetection/models/download_list.rb +2 -2
- data/lib/vpndetection/models/error_envelope.rb +2 -2
- data/lib/vpndetection/models/lookup_error.rb +2 -2
- data/lib/vpndetection/models/lookup_response.rb +2 -2
- data/lib/vpndetection/models/proxy_detail.rb +2 -2
- data/lib/vpndetection/models/vpn_detail.rb +3 -3
- data/lib/vpndetection/transport.rb +1 -1
- data/lib/vpndetection/version.rb +1 -1
- data/lib/vpndetection.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82db389580885df117745fbef0d540728daf6f3628e6a03945fc7b5b912935f4
|
|
4
|
+
data.tar.gz: 8f8a3c8f07f52d1f8f0fc875260b8ac2380353a739116982234be415a03dc82c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 910c251330b89bba4cc317fd29e572c37d20fb62226012a259a4dfdd659c6aa9fed111d3dfa2c74ce5585640069ba11764c0a416716fc8dc10d555ce2f532f4d
|
|
7
|
+
data.tar.gz: fdeb0cac2780aef06da6faccd5409f74efd0d0b0f50ac23c53af4fdedbee6316fad80c715302491a655545e7afb00b6ea39528acbed4a0ed6357e35c24edf2dc
|
data/README.md
CHANGED
|
@@ -134,7 +134,7 @@ Note that `:rate_limited` and `:quota_exceeded` both arrive as HTTP 429 and are
|
|
|
134
134
|
|
|
135
135
|
### Database downloads
|
|
136
136
|
|
|
137
|
-
If your key carries the `db.download` scope, the licensed
|
|
137
|
+
If your key carries the `db.download` scope, the licensed databases are available through `client.database`. A license covers a database FAMILY and a download names one of its versions, so the id comes from `versions`:
|
|
138
138
|
|
|
139
139
|
```ruby
|
|
140
140
|
family = client.database.list.first
|
|
@@ -145,7 +145,7 @@ url = client.database.download_url(id, 'mmdb')
|
|
|
145
145
|
bytes = client.database.download_bytes('cdn_ip_v1', 'csvgz')
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
`download` streams straight to disk, so nothing bigger than a chunk is ever held in memory whatever the
|
|
148
|
+
`download` streams straight to disk, so nothing bigger than a chunk is ever held in memory whatever the database weighs, and it writes through a neighboring `.part` file so a transfer that dies half way leaves no truncated copy behind. `download_url` hands back the time-limited link and follows nothing, for when you want to run the transfer yourself. `download_bytes` holds the whole file in memory, and the catalog runs from `cdn_ip_v1` at 10 KB to `resproxy_ip_90d_v1` at 1.79 GB, so reach for `download` for anything you have not measured.
|
|
149
149
|
|
|
150
150
|
### Absent is not false
|
|
151
151
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -13,7 +13,7 @@ Generator version: 7.25.0
|
|
|
13
13
|
require 'cgi'
|
|
14
14
|
|
|
15
15
|
module VPNDetection
|
|
16
|
-
class
|
|
16
|
+
class DatabaseWireApi
|
|
17
17
|
attr_accessor :api_client
|
|
18
18
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
@@ -24,7 +24,7 @@ module VPNDetection
|
|
|
24
24
|
# @param id [String]
|
|
25
25
|
# @param format [String]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
|
-
# @return [
|
|
27
|
+
# @return [DatabaseChecksumsResponse]
|
|
28
28
|
def database_checksum(id, format, opts = {})
|
|
29
29
|
data, _status_code, _headers = database_checksum_with_http_info(id, format, opts)
|
|
30
30
|
data
|
|
@@ -35,18 +35,18 @@ module VPNDetection
|
|
|
35
35
|
# @param id [String]
|
|
36
36
|
# @param format [String]
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
38
|
-
# @return [Array<(
|
|
38
|
+
# @return [Array<(DatabaseChecksumsResponse, Integer, Hash)>] DatabaseChecksumsResponse data, response status code and response headers
|
|
39
39
|
def database_checksum_with_http_info(id, format, opts = {})
|
|
40
40
|
if @api_client.config.debugging
|
|
41
|
-
@api_client.config.logger.debug 'Calling API:
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: DatabaseWireApi.database_checksum ...'
|
|
42
42
|
end
|
|
43
43
|
# verify the required parameter 'id' is set
|
|
44
44
|
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseWireApi.database_checksum"
|
|
46
46
|
end
|
|
47
47
|
# verify the required parameter 'format' is set
|
|
48
48
|
if @api_client.config.client_side_validation && format.nil?
|
|
49
|
-
fail ArgumentError, "Missing the required parameter 'format' when calling
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling DatabaseWireApi.database_checksum"
|
|
50
50
|
end
|
|
51
51
|
# verify enum value
|
|
52
52
|
allowable_values = ["csvgz", "mmdb"]
|
|
@@ -73,13 +73,13 @@ module VPNDetection
|
|
|
73
73
|
post_body = opts[:debug_body]
|
|
74
74
|
|
|
75
75
|
# return_type
|
|
76
|
-
return_type = opts[:debug_return_type] || '
|
|
76
|
+
return_type = opts[:debug_return_type] || 'DatabaseChecksumsResponse'
|
|
77
77
|
|
|
78
78
|
# auth_names
|
|
79
79
|
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
80
80
|
|
|
81
81
|
new_options = opts.merge(
|
|
82
|
-
:operation => :"
|
|
82
|
+
:operation => :"DatabaseWireApi.database_checksum",
|
|
83
83
|
:header_params => header_params,
|
|
84
84
|
:query_params => query_params,
|
|
85
85
|
:form_params => form_params,
|
|
@@ -90,7 +90,7 @@ module VPNDetection
|
|
|
90
90
|
|
|
91
91
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
92
92
|
if @api_client.config.debugging
|
|
93
|
-
@api_client.config.logger.debug "API called:
|
|
93
|
+
@api_client.config.logger.debug "API called: DatabaseWireApi#database_checksum\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
94
94
|
end
|
|
95
95
|
return data, status_code, headers
|
|
96
96
|
end
|
|
@@ -99,7 +99,7 @@ module VPNDetection
|
|
|
99
99
|
# Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything. No `format` parameter - one document describes every format the dataset is built in.
|
|
100
100
|
# @param id [String]
|
|
101
101
|
# @param [Hash] opts the optional parameters
|
|
102
|
-
# @return [
|
|
102
|
+
# @return [DatabaseMetadata]
|
|
103
103
|
def database_metadata(id, opts = {})
|
|
104
104
|
data, _status_code, _headers = database_metadata_with_http_info(id, opts)
|
|
105
105
|
data
|
|
@@ -109,14 +109,14 @@ module VPNDetection
|
|
|
109
109
|
# Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything. No `format` parameter - one document describes every format the dataset is built in.
|
|
110
110
|
# @param id [String]
|
|
111
111
|
# @param [Hash] opts the optional parameters
|
|
112
|
-
# @return [Array<(
|
|
112
|
+
# @return [Array<(DatabaseMetadata, Integer, Hash)>] DatabaseMetadata data, response status code and response headers
|
|
113
113
|
def database_metadata_with_http_info(id, opts = {})
|
|
114
114
|
if @api_client.config.debugging
|
|
115
|
-
@api_client.config.logger.debug 'Calling API:
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: DatabaseWireApi.database_metadata ...'
|
|
116
116
|
end
|
|
117
117
|
# verify the required parameter 'id' is set
|
|
118
118
|
if @api_client.config.client_side_validation && id.nil?
|
|
119
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseWireApi.database_metadata"
|
|
120
120
|
end
|
|
121
121
|
# resource path
|
|
122
122
|
local_var_path = '/api/v1/database/metadata'
|
|
@@ -137,13 +137,13 @@ module VPNDetection
|
|
|
137
137
|
post_body = opts[:debug_body]
|
|
138
138
|
|
|
139
139
|
# return_type
|
|
140
|
-
return_type = opts[:debug_return_type] || '
|
|
140
|
+
return_type = opts[:debug_return_type] || 'DatabaseMetadata'
|
|
141
141
|
|
|
142
142
|
# auth_names
|
|
143
143
|
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
144
144
|
|
|
145
145
|
new_options = opts.merge(
|
|
146
|
-
:operation => :"
|
|
146
|
+
:operation => :"DatabaseWireApi.database_metadata",
|
|
147
147
|
:header_params => header_params,
|
|
148
148
|
:query_params => query_params,
|
|
149
149
|
:form_params => form_params,
|
|
@@ -154,7 +154,7 @@ module VPNDetection
|
|
|
154
154
|
|
|
155
155
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
156
156
|
if @api_client.config.debugging
|
|
157
|
-
@api_client.config.logger.debug "API called:
|
|
157
|
+
@api_client.config.logger.debug "API called: DatabaseWireApi#database_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
158
158
|
end
|
|
159
159
|
return data, status_code, headers
|
|
160
160
|
end
|
|
@@ -178,15 +178,15 @@ module VPNDetection
|
|
|
178
178
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
179
179
|
def download_database_with_http_info(id, format, opts = {})
|
|
180
180
|
if @api_client.config.debugging
|
|
181
|
-
@api_client.config.logger.debug 'Calling API:
|
|
181
|
+
@api_client.config.logger.debug 'Calling API: DatabaseWireApi.download_database ...'
|
|
182
182
|
end
|
|
183
183
|
# verify the required parameter 'id' is set
|
|
184
184
|
if @api_client.config.client_side_validation && id.nil?
|
|
185
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseWireApi.download_database"
|
|
186
186
|
end
|
|
187
187
|
# verify the required parameter 'format' is set
|
|
188
188
|
if @api_client.config.client_side_validation && format.nil?
|
|
189
|
-
fail ArgumentError, "Missing the required parameter 'format' when calling
|
|
189
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling DatabaseWireApi.download_database"
|
|
190
190
|
end
|
|
191
191
|
# verify enum value
|
|
192
192
|
allowable_values = ["csvgz", "mmdb"]
|
|
@@ -219,7 +219,7 @@ module VPNDetection
|
|
|
219
219
|
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
220
220
|
|
|
221
221
|
new_options = opts.merge(
|
|
222
|
-
:operation => :"
|
|
222
|
+
:operation => :"DatabaseWireApi.download_database",
|
|
223
223
|
:header_params => header_params,
|
|
224
224
|
:query_params => query_params,
|
|
225
225
|
:form_params => form_params,
|
|
@@ -230,7 +230,7 @@ module VPNDetection
|
|
|
230
230
|
|
|
231
231
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
232
232
|
if @api_client.config.debugging
|
|
233
|
-
@api_client.config.logger.debug "API called:
|
|
233
|
+
@api_client.config.logger.debug "API called: DatabaseWireApi#download_database\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
234
234
|
end
|
|
235
235
|
return data, status_code, headers
|
|
236
236
|
end
|
|
@@ -238,7 +238,7 @@ module VPNDetection
|
|
|
238
238
|
# List
|
|
239
239
|
# Every dataset this organization holds a licence for, with the term and the license_type right beside each one.
|
|
240
240
|
# @param [Hash] opts the optional parameters
|
|
241
|
-
# @return [
|
|
241
|
+
# @return [DatabaseList]
|
|
242
242
|
def list_databases(opts = {})
|
|
243
243
|
data, _status_code, _headers = list_databases_with_http_info(opts)
|
|
244
244
|
data
|
|
@@ -247,10 +247,10 @@ module VPNDetection
|
|
|
247
247
|
# List
|
|
248
248
|
# Every dataset this organization holds a licence for, with the term and the license_type right beside each one.
|
|
249
249
|
# @param [Hash] opts the optional parameters
|
|
250
|
-
# @return [Array<(
|
|
250
|
+
# @return [Array<(DatabaseList, Integer, Hash)>] DatabaseList data, response status code and response headers
|
|
251
251
|
def list_databases_with_http_info(opts = {})
|
|
252
252
|
if @api_client.config.debugging
|
|
253
|
-
@api_client.config.logger.debug 'Calling API:
|
|
253
|
+
@api_client.config.logger.debug 'Calling API: DatabaseWireApi.list_databases ...'
|
|
254
254
|
end
|
|
255
255
|
# resource path
|
|
256
256
|
local_var_path = '/api/v1/database/list'
|
|
@@ -270,13 +270,13 @@ module VPNDetection
|
|
|
270
270
|
post_body = opts[:debug_body]
|
|
271
271
|
|
|
272
272
|
# return_type
|
|
273
|
-
return_type = opts[:debug_return_type] || '
|
|
273
|
+
return_type = opts[:debug_return_type] || 'DatabaseList'
|
|
274
274
|
|
|
275
275
|
# auth_names
|
|
276
276
|
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
277
277
|
|
|
278
278
|
new_options = opts.merge(
|
|
279
|
-
:operation => :"
|
|
279
|
+
:operation => :"DatabaseWireApi.list_databases",
|
|
280
280
|
:header_params => header_params,
|
|
281
281
|
:query_params => query_params,
|
|
282
282
|
:form_params => form_params,
|
|
@@ -287,7 +287,7 @@ module VPNDetection
|
|
|
287
287
|
|
|
288
288
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
289
289
|
if @api_client.config.debugging
|
|
290
|
-
@api_client.config.logger.debug "API called:
|
|
290
|
+
@api_client.config.logger.debug "API called: DatabaseWireApi#list_databases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
291
291
|
end
|
|
292
292
|
return data, status_code, headers
|
|
293
293
|
end
|
|
@@ -309,10 +309,10 @@ module VPNDetection
|
|
|
309
309
|
# @return [Array<(DownloadList, Integer, Hash)>] DownloadList data, response status code and response headers
|
|
310
310
|
def list_downloads_with_http_info(opts = {})
|
|
311
311
|
if @api_client.config.debugging
|
|
312
|
-
@api_client.config.logger.debug 'Calling API:
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: DatabaseWireApi.list_downloads ...'
|
|
313
313
|
end
|
|
314
314
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
315
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling
|
|
315
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DatabaseWireApi.list_downloads, must be smaller than or equal to 200.'
|
|
316
316
|
end
|
|
317
317
|
|
|
318
318
|
# resource path
|
|
@@ -340,7 +340,7 @@ module VPNDetection
|
|
|
340
340
|
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
341
341
|
|
|
342
342
|
new_options = opts.merge(
|
|
343
|
-
:operation => :"
|
|
343
|
+
:operation => :"DatabaseWireApi.list_downloads",
|
|
344
344
|
:header_params => header_params,
|
|
345
345
|
:query_params => query_params,
|
|
346
346
|
:form_params => form_params,
|
|
@@ -351,7 +351,7 @@ module VPNDetection
|
|
|
351
351
|
|
|
352
352
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
353
353
|
if @api_client.config.debugging
|
|
354
|
-
@api_client.config.logger.debug "API called:
|
|
354
|
+
@api_client.config.logger.debug "API called: DatabaseWireApi#list_downloads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
355
355
|
end
|
|
356
356
|
return data, status_code, headers
|
|
357
357
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -13,7 +13,7 @@ Generator version: 7.25.0
|
|
|
13
13
|
require 'cgi'
|
|
14
14
|
|
|
15
15
|
module VPNDetection
|
|
16
|
-
class
|
|
16
|
+
class LookupWireApi
|
|
17
17
|
attr_accessor :api_client
|
|
18
18
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
@@ -36,11 +36,11 @@ module VPNDetection
|
|
|
36
36
|
# @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
|
|
37
37
|
def lookup_ip_with_http_info(ip, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API:
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: LookupWireApi.lookup_ip ...'
|
|
40
40
|
end
|
|
41
41
|
# verify the required parameter 'ip' is set
|
|
42
42
|
if @api_client.config.client_side_validation && ip.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'ip' when calling
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'ip' when calling LookupWireApi.lookup_ip"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/{ip}'.sub('{ip}', CGI.escape(ip.to_s))
|
|
@@ -66,7 +66,7 @@ module VPNDetection
|
|
|
66
66
|
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
67
67
|
|
|
68
68
|
new_options = opts.merge(
|
|
69
|
-
:operation => :"
|
|
69
|
+
:operation => :"LookupWireApi.lookup_ip",
|
|
70
70
|
:header_params => header_params,
|
|
71
71
|
:query_params => query_params,
|
|
72
72
|
:form_params => form_params,
|
|
@@ -77,7 +77,7 @@ module VPNDetection
|
|
|
77
77
|
|
|
78
78
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
79
79
|
if @api_client.config.debugging
|
|
80
|
-
@api_client.config.logger.debug "API called:
|
|
80
|
+
@api_client.config.logger.debug "API called: LookupWireApi#lookup_ip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
81
|
end
|
|
82
82
|
return data, status_code, headers
|
|
83
83
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
data/lib/vpndetection/client.rb
CHANGED
|
@@ -36,7 +36,7 @@ module VPNDetection
|
|
|
36
36
|
@cache = cache ? Cache.new(max_size: cache_max_size, ttl: cache_ttl) : nil
|
|
37
37
|
@concurrency = concurrency
|
|
38
38
|
@retries = retries
|
|
39
|
-
@database =
|
|
39
|
+
@database = DatabaseApi.new(@transport, retries: retries)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
# Whether an address is private, loopback, link-local, documentation,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module VPNDetection
|
|
4
|
-
# The licensed
|
|
4
|
+
# The licensed database downloads, reached as `client.database`.
|
|
5
5
|
#
|
|
6
6
|
# Access is granted by contract rather than self-serve, so every method here
|
|
7
7
|
# needs a key carrying the `db.download` scope.
|
|
8
|
-
class
|
|
8
|
+
class DatabaseApi
|
|
9
9
|
def initialize(transport, retries:)
|
|
10
10
|
@transport = transport
|
|
11
|
-
@api =
|
|
11
|
+
@api = DatabaseWireApi.new(transport)
|
|
12
12
|
@retries = retries
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
# The
|
|
15
|
+
# The database FAMILIES your organization is licensed to download.
|
|
16
16
|
#
|
|
17
17
|
# A license is held against the family, while a download names one version,
|
|
18
18
|
# so the ids {#download}, {#download_bytes}, {#download_url} and {#checksums}
|
|
19
19
|
# take come from each family's `versions`, not from the family itself.
|
|
20
20
|
def list
|
|
21
|
-
call { @api.list_databases.
|
|
21
|
+
call { @api.list_databases.databases }
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
# What is inside one dataset: schema, samples, row count and sizes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
17
|
# One dataset FAMILY your organization is licensed for. A license covers the family, while a download names a specific version, so the ids you pass to the download and checksum endpoints come from `versions`.
|
|
18
|
-
class
|
|
18
|
+
class Database < ApiModelBase
|
|
19
19
|
# The dataset family, e.g. `vpn_ip`. What the license is held against.
|
|
20
20
|
attr_accessor :base
|
|
21
21
|
|
|
@@ -108,7 +108,7 @@ module VPNDetection
|
|
|
108
108
|
:'notice_due_at' => :'Time',
|
|
109
109
|
:'in_term' => :'Boolean',
|
|
110
110
|
:'standing' => :'String',
|
|
111
|
-
:'versions' => :'Array<
|
|
111
|
+
:'versions' => :'Array<DatabaseVersion>'
|
|
112
112
|
}
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -126,14 +126,14 @@ module VPNDetection
|
|
|
126
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
127
|
def initialize(attributes = {})
|
|
128
128
|
if (!attributes.is_a?(Hash))
|
|
129
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
129
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::Database` initialize method"
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
133
133
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
134
134
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
135
135
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
136
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
136
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::Database`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
137
137
|
end
|
|
138
138
|
h[k.to_sym] = v
|
|
139
139
|
}
|
data/lib/vpndetection/models/{dataset_checksums_response.rb → database_checksums_response.rb}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
class
|
|
17
|
+
class DatabaseChecksumsResponse < ApiModelBase
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
20
|
attr_accessor :format
|
|
@@ -45,7 +45,7 @@ module VPNDetection
|
|
|
45
45
|
{
|
|
46
46
|
:'id' => :'String',
|
|
47
47
|
:'format' => :'String',
|
|
48
|
-
:'checksums' => :'
|
|
48
|
+
:'checksums' => :'DbChecksums'
|
|
49
49
|
}
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -59,14 +59,14 @@ module VPNDetection
|
|
|
59
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
60
|
def initialize(attributes = {})
|
|
61
61
|
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DatabaseChecksumsResponse` initialize method"
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
66
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
68
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DatabaseChecksumsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
70
|
end
|
|
71
71
|
h[k.to_sym] = v
|
|
72
72
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
class
|
|
17
|
+
class DatabaseFormatSize < ApiModelBase
|
|
18
18
|
attr_accessor :format
|
|
19
19
|
|
|
20
20
|
# Size of the published file, or null when it has not been published yet
|
|
@@ -79,14 +79,14 @@ module VPNDetection
|
|
|
79
79
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
80
|
def initialize(attributes = {})
|
|
81
81
|
if (!attributes.is_a?(Hash))
|
|
82
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DatabaseFormatSize` initialize method"
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
86
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
87
87
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
88
88
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
89
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DatabaseFormatSize`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
90
90
|
end
|
|
91
91
|
h[k.to_sym] = v
|
|
92
92
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,13 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
class
|
|
18
|
-
attr_accessor :
|
|
17
|
+
class DatabaseList < ApiModelBase
|
|
18
|
+
attr_accessor :databases
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
21
|
def self.attribute_map
|
|
22
22
|
{
|
|
23
|
-
:'
|
|
23
|
+
:'databases' => :'databases'
|
|
24
24
|
}
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -37,7 +37,7 @@ module VPNDetection
|
|
|
37
37
|
# Attribute type mapping.
|
|
38
38
|
def self.openapi_types
|
|
39
39
|
{
|
|
40
|
-
:'
|
|
40
|
+
:'databases' => :'Array<Database>'
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -51,24 +51,24 @@ module VPNDetection
|
|
|
51
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
52
|
def initialize(attributes = {})
|
|
53
53
|
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DatabaseList` initialize method"
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
58
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
60
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DatabaseList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
62
|
end
|
|
63
63
|
h[k.to_sym] = v
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
if attributes.key?(:'
|
|
67
|
-
if (value = attributes[:'
|
|
68
|
-
self.
|
|
66
|
+
if attributes.key?(:'databases')
|
|
67
|
+
if (value = attributes[:'databases']).is_a?(Array)
|
|
68
|
+
self.databases = value
|
|
69
69
|
end
|
|
70
70
|
else
|
|
71
|
-
self.
|
|
71
|
+
self.databases = nil
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
@@ -77,8 +77,8 @@ module VPNDetection
|
|
|
77
77
|
def list_invalid_properties
|
|
78
78
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
79
79
|
invalid_properties = Array.new
|
|
80
|
-
if @
|
|
81
|
-
invalid_properties.push('invalid value for "
|
|
80
|
+
if @databases.nil?
|
|
81
|
+
invalid_properties.push('invalid value for "databases", databases cannot be nil.')
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
invalid_properties
|
|
@@ -88,18 +88,18 @@ module VPNDetection
|
|
|
88
88
|
# @return true if the model is valid
|
|
89
89
|
def valid?
|
|
90
90
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
-
return false if @
|
|
91
|
+
return false if @databases.nil?
|
|
92
92
|
true
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# Custom attribute writer method with validation
|
|
96
|
-
# @param [Object]
|
|
97
|
-
def
|
|
98
|
-
if
|
|
99
|
-
fail ArgumentError, '
|
|
96
|
+
# @param [Object] databases Value to be assigned
|
|
97
|
+
def databases=(databases)
|
|
98
|
+
if databases.nil?
|
|
99
|
+
fail ArgumentError, 'databases cannot be nil'
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
-
@
|
|
102
|
+
@databases = databases
|
|
103
103
|
end
|
|
104
104
|
|
|
105
105
|
# Checks equality by comparing each attribute.
|
|
@@ -107,7 +107,7 @@ module VPNDetection
|
|
|
107
107
|
def ==(o)
|
|
108
108
|
return true if self.equal?(o)
|
|
109
109
|
self.class == o.class &&
|
|
110
|
-
|
|
110
|
+
databases == o.databases
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
# @see the `==` method
|
|
@@ -119,7 +119,7 @@ module VPNDetection
|
|
|
119
119
|
# Calculates hash code according to all attributes.
|
|
120
120
|
# @return [Integer] Hash code
|
|
121
121
|
def hash
|
|
122
|
-
[
|
|
122
|
+
[databases].hash
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
# Builds the object from hash
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
class
|
|
17
|
+
class DatabaseMetadata < ApiModelBase
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
20
|
# How often a new build is published
|
|
@@ -72,7 +72,7 @@ module VPNDetection
|
|
|
72
72
|
:'update_freq' => :'String',
|
|
73
73
|
:'updated' => :'Date',
|
|
74
74
|
:'entries' => :'Integer',
|
|
75
|
-
:'schema' => :'Hash<String, Array<
|
|
75
|
+
:'schema' => :'Hash<String, Array<DatabaseMetadataColumn>>',
|
|
76
76
|
:'sample' => :'Hash<String, Array<Object>>',
|
|
77
77
|
:'size' => :'Hash<String, Integer>',
|
|
78
78
|
:'sample_size' => :'Hash<String, Integer>',
|
|
@@ -90,14 +90,14 @@ module VPNDetection
|
|
|
90
90
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
91
|
def initialize(attributes = {})
|
|
92
92
|
if (!attributes.is_a?(Hash))
|
|
93
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DatabaseMetadata` initialize method"
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
97
97
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
98
98
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
99
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
100
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DatabaseMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
101
101
|
end
|
|
102
102
|
h[k.to_sym] = v
|
|
103
103
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
class
|
|
17
|
+
class DatabaseMetadataColumn < ApiModelBase
|
|
18
18
|
attr_accessor :name
|
|
19
19
|
|
|
20
20
|
attr_accessor :type
|
|
@@ -59,14 +59,14 @@ module VPNDetection
|
|
|
59
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
60
|
def initialize(attributes = {})
|
|
61
61
|
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DatabaseMetadataColumn` initialize method"
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
66
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
68
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DatabaseMetadataColumn`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
70
|
end
|
|
71
71
|
h[k.to_sym] = v
|
|
72
72
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
class
|
|
17
|
+
class DatabaseVersion < ApiModelBase
|
|
18
18
|
# The versioned dataset id, e.g. `vpn_ip_v1`. Pass this to download.
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -56,7 +56,7 @@ module VPNDetection
|
|
|
56
56
|
:'version' => :'version',
|
|
57
57
|
:'summary' => :'summary',
|
|
58
58
|
:'formats' => :'formats',
|
|
59
|
-
:'sample_formats' => :'
|
|
59
|
+
:'sample_formats' => :'sample_formats'
|
|
60
60
|
}
|
|
61
61
|
end
|
|
62
62
|
|
|
@@ -76,7 +76,7 @@ module VPNDetection
|
|
|
76
76
|
:'id' => :'String',
|
|
77
77
|
:'version' => :'Integer',
|
|
78
78
|
:'summary' => :'String',
|
|
79
|
-
:'formats' => :'Array<
|
|
79
|
+
:'formats' => :'Array<DatabaseFormatSize>',
|
|
80
80
|
:'sample_formats' => :'Array<String>'
|
|
81
81
|
}
|
|
82
82
|
end
|
|
@@ -91,14 +91,14 @@ module VPNDetection
|
|
|
91
91
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
92
|
def initialize(attributes = {})
|
|
93
93
|
if (!attributes.is_a?(Hash))
|
|
94
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DatabaseVersion` initialize method"
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
98
98
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
99
99
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
100
100
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
101
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DatabaseVersion`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
102
102
|
end
|
|
103
103
|
h[k.to_sym] = v
|
|
104
104
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,8 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
|
|
17
|
+
# The published digests for one database file.
|
|
18
|
+
class DbChecksums < ApiModelBase
|
|
18
19
|
attr_accessor :md5
|
|
19
20
|
|
|
20
21
|
attr_accessor :sha1
|
|
@@ -63,32 +64,40 @@ module VPNDetection
|
|
|
63
64
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
65
|
def initialize(attributes = {})
|
|
65
66
|
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DbChecksums` initialize method"
|
|
67
68
|
end
|
|
68
69
|
|
|
69
70
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
71
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
72
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
73
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DbChecksums`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
75
|
end
|
|
75
76
|
h[k.to_sym] = v
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
if attributes.key?(:'md5')
|
|
79
80
|
self.md5 = attributes[:'md5']
|
|
81
|
+
else
|
|
82
|
+
self.md5 = nil
|
|
80
83
|
end
|
|
81
84
|
|
|
82
85
|
if attributes.key?(:'sha1')
|
|
83
86
|
self.sha1 = attributes[:'sha1']
|
|
87
|
+
else
|
|
88
|
+
self.sha1 = nil
|
|
84
89
|
end
|
|
85
90
|
|
|
86
91
|
if attributes.key?(:'sha256')
|
|
87
92
|
self.sha256 = attributes[:'sha256']
|
|
93
|
+
else
|
|
94
|
+
self.sha256 = nil
|
|
88
95
|
end
|
|
89
96
|
|
|
90
97
|
if attributes.key?(:'sha512')
|
|
91
98
|
self.sha512 = attributes[:'sha512']
|
|
99
|
+
else
|
|
100
|
+
self.sha512 = nil
|
|
92
101
|
end
|
|
93
102
|
end
|
|
94
103
|
|
|
@@ -97,6 +106,22 @@ module VPNDetection
|
|
|
97
106
|
def list_invalid_properties
|
|
98
107
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
108
|
invalid_properties = Array.new
|
|
109
|
+
if @md5.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "md5", md5 cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if @sha1.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "sha1", sha1 cannot be nil.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @sha256.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @sha512.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "sha512", sha512 cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
100
125
|
invalid_properties
|
|
101
126
|
end
|
|
102
127
|
|
|
@@ -104,9 +129,53 @@ module VPNDetection
|
|
|
104
129
|
# @return true if the model is valid
|
|
105
130
|
def valid?
|
|
106
131
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
132
|
+
return false if @md5.nil?
|
|
133
|
+
return false if @sha1.nil?
|
|
134
|
+
return false if @sha256.nil?
|
|
135
|
+
return false if @sha512.nil?
|
|
107
136
|
true
|
|
108
137
|
end
|
|
109
138
|
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] md5 Value to be assigned
|
|
141
|
+
def md5=(md5)
|
|
142
|
+
if md5.nil?
|
|
143
|
+
fail ArgumentError, 'md5 cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@md5 = md5
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] sha1 Value to be assigned
|
|
151
|
+
def sha1=(sha1)
|
|
152
|
+
if sha1.nil?
|
|
153
|
+
fail ArgumentError, 'sha1 cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@sha1 = sha1
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] sha256 Value to be assigned
|
|
161
|
+
def sha256=(sha256)
|
|
162
|
+
if sha256.nil?
|
|
163
|
+
fail ArgumentError, 'sha256 cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@sha256 = sha256
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] sha512 Value to be assigned
|
|
171
|
+
def sha512=(sha512)
|
|
172
|
+
if sha512.nil?
|
|
173
|
+
fail ArgumentError, 'sha512 cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@sha512 = sha512
|
|
177
|
+
end
|
|
178
|
+
|
|
110
179
|
# Checks equality by comparing each attribute.
|
|
111
180
|
# @param [Object] Object to be compared
|
|
112
181
|
def ==(o)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.09.
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -25,7 +25,7 @@ module VPNDetection
|
|
|
25
25
|
# How strongly the attribution is supported. Max only.
|
|
26
26
|
attr_accessor :confidence
|
|
27
27
|
|
|
28
|
-
#
|
|
28
|
+
# The class of evidence the attribution rests on, one of four values. Max only. `scan` - we spoke the VPN protocol to the address ourselves and got a valid server response. `scrape` - the operator published the address through its own API, client or configuration. `registry` - public registration or naming records attribute it to the operator. `infer` - the address was extrapolated from confirmed neighbours in the same block.
|
|
29
29
|
attr_accessor :method
|
|
30
30
|
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -8,7 +8,7 @@ module VPNDetection
|
|
|
8
8
|
# The generated wire client, with the three things it gets wrong for this API
|
|
9
9
|
# corrected in one place.
|
|
10
10
|
class Transport < ApiClient
|
|
11
|
-
# The same path template the generated
|
|
11
|
+
# The same path template the generated LookupWireApi holds. Both are asserted
|
|
12
12
|
# against each other in the test suite, because the batch builds its own
|
|
13
13
|
# requests to queue them on a hydra and cannot go through the generated
|
|
14
14
|
# method, which runs each request as it builds it.
|
data/lib/vpndetection/version.rb
CHANGED
data/lib/vpndetection.rb
CHANGED
|
@@ -19,7 +19,7 @@ require 'vpndetection/bogon'
|
|
|
19
19
|
require 'vpndetection/cache'
|
|
20
20
|
require 'vpndetection/retries'
|
|
21
21
|
require 'vpndetection/transport'
|
|
22
|
-
require 'vpndetection/
|
|
22
|
+
require 'vpndetection/database_api'
|
|
23
23
|
require 'vpndetection/client'
|
|
24
24
|
|
|
25
25
|
# The official Ruby client library for the VPNDetection API.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vpndetection
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mslm Dev
|
|
@@ -48,8 +48,8 @@ files:
|
|
|
48
48
|
- LICENSE
|
|
49
49
|
- README.md
|
|
50
50
|
- lib/vpndetection.rb
|
|
51
|
-
- lib/vpndetection/api/
|
|
52
|
-
- lib/vpndetection/api/
|
|
51
|
+
- lib/vpndetection/api/database_wire_api.rb
|
|
52
|
+
- lib/vpndetection/api/lookup_wire_api.rb
|
|
53
53
|
- lib/vpndetection/api_client.rb
|
|
54
54
|
- lib/vpndetection/api_error.rb
|
|
55
55
|
- lib/vpndetection/api_model_base.rb
|
|
@@ -58,20 +58,20 @@ files:
|
|
|
58
58
|
- lib/vpndetection/cache.rb
|
|
59
59
|
- lib/vpndetection/client.rb
|
|
60
60
|
- lib/vpndetection/configuration.rb
|
|
61
|
-
- lib/vpndetection/
|
|
61
|
+
- lib/vpndetection/database_api.rb
|
|
62
62
|
- lib/vpndetection/errors.rb
|
|
63
63
|
- lib/vpndetection/models/class_detail.rb
|
|
64
|
-
- lib/vpndetection/models/
|
|
65
|
-
- lib/vpndetection/models/
|
|
66
|
-
- lib/vpndetection/models/
|
|
67
|
-
- lib/vpndetection/models/
|
|
68
|
-
- lib/vpndetection/models/
|
|
69
|
-
- lib/vpndetection/models/
|
|
64
|
+
- lib/vpndetection/models/database.rb
|
|
65
|
+
- lib/vpndetection/models/database_checksums_response.rb
|
|
66
|
+
- lib/vpndetection/models/database_format_size.rb
|
|
67
|
+
- lib/vpndetection/models/database_list.rb
|
|
68
|
+
- lib/vpndetection/models/database_metadata.rb
|
|
69
|
+
- lib/vpndetection/models/database_metadata_column.rb
|
|
70
|
+
- lib/vpndetection/models/database_version.rb
|
|
71
|
+
- lib/vpndetection/models/db_checksums.rb
|
|
70
72
|
- lib/vpndetection/models/download.rb
|
|
71
73
|
- lib/vpndetection/models/download_list.rb
|
|
72
74
|
- lib/vpndetection/models/error_envelope.rb
|
|
73
|
-
- lib/vpndetection/models/licensed_dataset.rb
|
|
74
|
-
- lib/vpndetection/models/licensed_version.rb
|
|
75
75
|
- lib/vpndetection/models/lookup_error.rb
|
|
76
76
|
- lib/vpndetection/models/lookup_response.rb
|
|
77
77
|
- lib/vpndetection/models/proxy_detail.rb
|