vpndetection 5.18.0 → 5.19.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/account_wire_api.rb +3 -3
- data/lib/vpndetection/api/api_keys_wire_api.rb +9 -9
- data/lib/vpndetection/api/authorization_wire_api.rb +1 -1
- data/lib/vpndetection/api/database_wire_api.rb +1 -1
- data/lib/vpndetection/api/entitlement_wire_api.rb +1 -1
- data/lib/vpndetection/api/lookup_wire_api.rb +15 -1
- data/lib/vpndetection/api/organization_wire_api.rb +5 -5
- data/lib/vpndetection/api_client.rb +1 -1
- data/lib/vpndetection/api_error.rb +1 -1
- data/lib/vpndetection/api_model_base.rb +1 -1
- data/lib/vpndetection/configuration.rb +2 -2
- data/lib/vpndetection/models/abuse_contact.rb +1 -1
- data/lib/vpndetection/models/account_create_apikey_request.rb +1 -1
- data/lib/vpndetection/models/account_created_apikey.rb +1 -1
- data/lib/vpndetection/models/account_org.rb +1 -1
- data/lib/vpndetection/models/account_org_ref.rb +1 -1
- data/lib/vpndetection/models/account_org_wrap.rb +1 -1
- data/lib/vpndetection/models/account_rc.rb +1 -1
- data/lib/vpndetection/models/account_revealed_apikey.rb +1 -1
- data/lib/vpndetection/models/account_user.rb +1 -1
- data/lib/vpndetection/models/apikey_detail.rb +1 -1
- data/lib/vpndetection/models/apikey_list.rb +1 -1
- data/lib/vpndetection/models/asn.rb +35 -1
- data/lib/vpndetection/models/batch_lookup_error.rb +1 -1
- data/lib/vpndetection/models/batch_lookup_request.rb +17 -5
- data/lib/vpndetection/models/batch_lookup_response.rb +1 -1
- data/lib/vpndetection/models/bit_torrent_detail.rb +1 -1
- data/lib/vpndetection/models/bot_detail.rb +243 -0
- data/lib/vpndetection/models/carrier_detail.rb +1 -1
- data/lib/vpndetection/models/class_detail.rb +1 -1
- data/lib/vpndetection/models/client_registration.rb +1 -1
- data/lib/vpndetection/models/client_registration_request.rb +1 -1
- data/lib/vpndetection/models/company.rb +1 -1
- data/lib/vpndetection/models/database.rb +1 -1
- data/lib/vpndetection/models/database_checksums_response.rb +1 -1
- data/lib/vpndetection/models/database_format.rb +1 -1
- data/lib/vpndetection/models/database_format_size.rb +1 -1
- data/lib/vpndetection/models/database_list.rb +1 -1
- data/lib/vpndetection/models/database_metadata.rb +1 -1
- data/lib/vpndetection/models/database_metadata_column.rb +1 -1
- data/lib/vpndetection/models/database_version.rb +1 -1
- data/lib/vpndetection/models/db_checksums.rb +1 -1
- data/lib/vpndetection/models/device_authorization.rb +1 -1
- data/lib/vpndetection/models/dns_resolver_detail.rb +1 -1
- data/lib/vpndetection/models/download.rb +1 -1
- data/lib/vpndetection/models/download_list.rb +1 -1
- data/lib/vpndetection/models/entitlement.rb +1 -1
- data/lib/vpndetection/models/entitlement_apikey.rb +1 -1
- data/lib/vpndetection/models/entitlement_error.rb +1 -1
- data/lib/vpndetection/models/entitlement_plan.rb +1 -1
- data/lib/vpndetection/models/entitlement_usage.rb +1 -1
- data/lib/vpndetection/models/error_envelope.rb +1 -1
- data/lib/vpndetection/models/identity.rb +1 -1
- data/lib/vpndetection/models/location.rb +1 -1
- data/lib/vpndetection/models/lookup_error.rb +1 -1
- data/lib/vpndetection/models/lookup_response.rb +32 -2
- data/lib/vpndetection/models/oauth_error.rb +1 -1
- data/lib/vpndetection/models/oauth_metadata.rb +1 -1
- data/lib/vpndetection/models/proxy_detail.rb +1 -1
- data/lib/vpndetection/models/pubproxy_detail.rb +1 -1
- data/lib/vpndetection/models/satellite_detail.rb +1 -1
- data/lib/vpndetection/models/smtp_detail.rb +1 -1
- data/lib/vpndetection/models/ssh_detail.rb +1 -1
- data/lib/vpndetection/models/standing.rb +1 -1
- data/lib/vpndetection/models/token_response.rb +1 -1
- data/lib/vpndetection/models/user_agent_verdict.rb +239 -0
- data/lib/vpndetection/models/vpn_detail.rb +1 -1
- data/lib/vpndetection/models/web_detail.rb +1 -1
- data/lib/vpndetection/result.rb +25 -3
- data/lib/vpndetection/transport.rb +3 -1
- data/lib/vpndetection/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d37af7f65d9c768211355a3d46eec4e9ffd89cbc58dc8f808528befbad1f5aa7
|
|
4
|
+
data.tar.gz: 110014ae00c5afe6796c553a1c4254f095caaa7ca6e5d21cbe56471f87877fac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b09e4e967731a1acbcf163515d9c4b1089c398ab748efa645209714e167607371b75ad9a5e4ccede040f2476a44fc9687f068d960e773e27128a52c957ee54c8
|
|
7
|
+
data.tar.gz: 21baa1cb5afead61a6f0d98e6dc2794f577293550bae02aa65707ce27cc5cbe4415ffe64694a8f26443a21a1113993c2613b3bcc82c03d9b6b27ffdb6ece658f
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Requires Ruby 3.3 or newer, and libcurl at runtime, which the `curl` package bri
|
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
|
-
**No API key needed to start.** Unlimited, the free plan, answers `ip`, `is_vpn`, Tor and relay detection, `is_anycast`, `hostname` (the reverse DNS name), country-level `location` and `asn` with the AS's country and RPKI status, with no daily or monthly cap, with a key or without one.
|
|
26
|
+
**No API key needed to start.** Unlimited, the free plan, answers `ip`, `is_vpn`, Tor and relay detection, `is_anycast`, `is_bot` (whether an automated client, such as a search engine's crawler, uses the address), `hostname` (the reverse DNS name), country-level `location` and `asn` with the AS's country and RPKI status, with no daily or monthly cap, with a key or without one.
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
29
|
require 'vpndetection'
|
|
@@ -38,7 +38,7 @@ result.asn['name'] # who runs the announcing network
|
|
|
38
38
|
|
|
39
39
|
### With an API key
|
|
40
40
|
|
|
41
|
-
Every paid plan answers every field: `is_hosting`, `is_cdn` and the four proxy flags as well, the carrier and satellite flags, the five service flags (SSH, SMTP, web, DNS resolver and BitTorrent), city-level `location`, the `company` and the `abuse` contact, and the provider (its ID and its name), confidence and last-seen detail behind each flag. The plans differ only in how many lookups they include, and a free account tries every field. Create a key in the [console](https://app.vpndetection.io), then pass it in:
|
|
41
|
+
Every paid plan answers every field: `is_hosting`, `is_cdn` and the four proxy flags as well, the carrier and satellite flags, the five service flags (SSH, SMTP, web, DNS resolver and BitTorrent), city-level `location`, the `company` and the `abuse` contact, `bot` (whose bot uses the address, what it does and whether its operator vouches for the address), and the provider (its ID and its name), confidence and last-seen detail behind each flag. The plans differ only in how many lookups they include, and a free account tries every field. Create a key in the [console](https://app.vpndetection.io), then pass it in:
|
|
42
42
|
|
|
43
43
|
```ruby
|
|
44
44
|
client = VPNDetection::Client.new(api_key: ENV['VPNDETECTION_API_KEY'])
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Identity
|
|
23
|
-
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field. `scopes` is what the credential may do now, so a client can check before it calls.
|
|
23
|
+
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field. `scopes` is what the credential may do now, so a client can check before it calls. Needs the `account.read` scope.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [Identity]
|
|
26
26
|
def account_identity(opts = {})
|
|
@@ -29,7 +29,7 @@ module VPNDetection
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Identity
|
|
32
|
-
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field. `scopes` is what the credential may do now, so a client can check before it calls.
|
|
32
|
+
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field. `scopes` is what the credential may do now, so a client can check before it calls. Needs the `account.read` scope.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
|
|
35
35
|
def account_identity_with_http_info(opts = {})
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create
|
|
23
|
-
# Creates a key and returns its secret. Store the secret now. Reading it back later takes `reveal` and the `apikeys.reveal` scope.
|
|
23
|
+
# Creates a key and returns its secret. Store the secret now. Reading it back later takes `reveal` and the `apikeys.reveal` scope. Needs the `apikeys.manage` scope.
|
|
24
24
|
# @param account_create_apikey_request [AccountCreateApikeyRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [AccountCreatedApikey]
|
|
@@ -30,7 +30,7 @@ module VPNDetection
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create
|
|
33
|
-
# Creates a key and returns its secret. Store the secret now. Reading it back later takes `reveal` and the `apikeys.reveal` scope.
|
|
33
|
+
# Creates a key and returns its secret. Store the secret now. Reading it back later takes `reveal` and the `apikeys.reveal` scope. Needs the `apikeys.manage` scope.
|
|
34
34
|
# @param account_create_apikey_request [AccountCreateApikeyRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(AccountCreatedApikey, Integer, Hash)>] AccountCreatedApikey data, response status code and response headers
|
|
@@ -88,7 +88,7 @@ module VPNDetection
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# List
|
|
91
|
-
# Each key's metadata. A list never carries a secret, here or in the console: `reveal` reads one. `retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read.
|
|
91
|
+
# Each key's metadata. A list never carries a secret, here or in the console: `reveal` reads one. `retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read. Needs the `apikeys.read` scope.
|
|
92
92
|
# @param [Hash] opts the optional parameters
|
|
93
93
|
# @return [ApikeyList]
|
|
94
94
|
def account_list_apikeys(opts = {})
|
|
@@ -97,7 +97,7 @@ module VPNDetection
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
# List
|
|
100
|
-
# Each key's metadata. A list never carries a secret, here or in the console: `reveal` reads one. `retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read.
|
|
100
|
+
# Each key's metadata. A list never carries a secret, here or in the console: `reveal` reads one. `retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read. Needs the `apikeys.read` scope.
|
|
101
101
|
# @param [Hash] opts the optional parameters
|
|
102
102
|
# @return [Array<(ApikeyList, Integer, Hash)>] ApikeyList data, response status code and response headers
|
|
103
103
|
def account_list_apikeys_with_http_info(opts = {})
|
|
@@ -145,7 +145,7 @@ module VPNDetection
|
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
# Reveal
|
|
148
|
-
# Returns an existing key's secret. It needs the `apikeys.reveal` scope, which `apikeys.manage` doesn't include. Refused with `NOT_RETRIEVABLE` for a key issued before we kept secrets. Rotate that key instead.
|
|
148
|
+
# Returns an existing key's secret. It needs the `apikeys.reveal` scope, which `apikeys.manage` doesn't include. Refused with `NOT_RETRIEVABLE` for a key issued before we kept secrets. Rotate that key instead. Needs the `apikeys.reveal` scope.
|
|
149
149
|
# @param id [String] The key's ID, as returned by the list endpoint. Never the key itself.
|
|
150
150
|
# @param [Hash] opts the optional parameters
|
|
151
151
|
# @return [AccountRevealedApikey]
|
|
@@ -155,7 +155,7 @@ module VPNDetection
|
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# Reveal
|
|
158
|
-
# Returns an existing key's secret. It needs the `apikeys.reveal` scope, which `apikeys.manage` doesn't include. Refused with `NOT_RETRIEVABLE` for a key issued before we kept secrets. Rotate that key instead.
|
|
158
|
+
# Returns an existing key's secret. It needs the `apikeys.reveal` scope, which `apikeys.manage` doesn't include. Refused with `NOT_RETRIEVABLE` for a key issued before we kept secrets. Rotate that key instead. Needs the `apikeys.reveal` scope.
|
|
159
159
|
# @param id [String] The key's ID, as returned by the list endpoint. Never the key itself.
|
|
160
160
|
# @param [Hash] opts the optional parameters
|
|
161
161
|
# @return [Array<(AccountRevealedApikey, Integer, Hash)>] AccountRevealedApikey data, response status code and response headers
|
|
@@ -208,7 +208,7 @@ module VPNDetection
|
|
|
208
208
|
end
|
|
209
209
|
|
|
210
210
|
# Revoke
|
|
211
|
-
# Stops the key working. Revocation is soft: the key stays listed with a `revoked_at`, because the organization still owns whatever it did while it was alive.
|
|
211
|
+
# Stops the key working. Revocation is soft: the key stays listed with a `revoked_at`, because the organization still owns whatever it did while it was alive. Needs the `apikeys.manage` scope.
|
|
212
212
|
# @param id [String] The key's ID, as returned by the list endpoint. Never the key itself.
|
|
213
213
|
# @param [Hash] opts the optional parameters
|
|
214
214
|
# @return [AccountRc]
|
|
@@ -218,7 +218,7 @@ module VPNDetection
|
|
|
218
218
|
end
|
|
219
219
|
|
|
220
220
|
# Revoke
|
|
221
|
-
# Stops the key working. Revocation is soft: the key stays listed with a `revoked_at`, because the organization still owns whatever it did while it was alive.
|
|
221
|
+
# Stops the key working. Revocation is soft: the key stays listed with a `revoked_at`, because the organization still owns whatever it did while it was alive. Needs the `apikeys.manage` scope.
|
|
222
222
|
# @param id [String] The key's ID, as returned by the list endpoint. Never the key itself.
|
|
223
223
|
# @param [Hash] opts the optional parameters
|
|
224
224
|
# @return [Array<(AccountRc, Integer, Hash)>] AccountRc data, response status code and response headers
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -91,6 +91,7 @@ module VPNDetection
|
|
|
91
91
|
# Answers what is known about a single IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key, on Unlimited, the free plan, the answer is `ip`, `is_vpn`, the Tor and relay members, `is_anycast`, `hostname`, `location` and `asn`.
|
|
92
92
|
# @param ip [String] The IPv4 or IPv6 address to classify.
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :user_agent The `User-Agent` header of the request you are deciding on. With every field, on a paid plan or the trial, the answer then carries `user_agent`: the agent it names, and whether this address bears that out. Never kept, and nothing sent with a lookup feeds our data.
|
|
94
95
|
# @return [LookupResponse]
|
|
95
96
|
def lookup_ip(ip, opts = {})
|
|
96
97
|
data, _status_code, _headers = lookup_ip_with_http_info(ip, opts)
|
|
@@ -101,6 +102,7 @@ module VPNDetection
|
|
|
101
102
|
# Answers what is known about a single IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key, on Unlimited, the free plan, the answer is `ip`, `is_vpn`, the Tor and relay members, `is_anycast`, `hostname`, `location` and `asn`.
|
|
102
103
|
# @param ip [String] The IPv4 or IPv6 address to classify.
|
|
103
104
|
# @param [Hash] opts the optional parameters
|
|
105
|
+
# @option opts [String] :user_agent The `User-Agent` header of the request you are deciding on. With every field, on a paid plan or the trial, the answer then carries `user_agent`: the agent it names, and whether this address bears that out. Never kept, and nothing sent with a lookup feeds our data.
|
|
104
106
|
# @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
|
|
105
107
|
def lookup_ip_with_http_info(ip, opts = {})
|
|
106
108
|
if @api_client.config.debugging
|
|
@@ -110,11 +112,16 @@ module VPNDetection
|
|
|
110
112
|
if @api_client.config.client_side_validation && ip.nil?
|
|
111
113
|
fail ArgumentError, "Missing the required parameter 'ip' when calling LookupWireApi.lookup_ip"
|
|
112
114
|
end
|
|
115
|
+
if @api_client.config.client_side_validation && !opts[:'user_agent'].nil? && opts[:'user_agent'].to_s.length > 1024
|
|
116
|
+
fail ArgumentError, 'invalid value for "opts[:"user_agent"]" when calling LookupWireApi.lookup_ip, the character length must be smaller than or equal to 1024.'
|
|
117
|
+
end
|
|
118
|
+
|
|
113
119
|
# resource path
|
|
114
120
|
local_var_path = '/{ip}'.sub('{ip}', CGI.escape(ip.to_s))
|
|
115
121
|
|
|
116
122
|
# query parameters
|
|
117
123
|
query_params = opts[:query_params] || {}
|
|
124
|
+
query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
118
125
|
|
|
119
126
|
# header parameters
|
|
120
127
|
header_params = opts[:header_params] || {}
|
|
@@ -153,6 +160,7 @@ module VPNDetection
|
|
|
153
160
|
# My IP
|
|
154
161
|
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the presented key decides which fields come back, and the request counts against the same limits. The address is the one our edge observed, so a request through a proxy or a VPN reports the exit it left through rather than the machine that made it. That is usually the point of asking.
|
|
155
162
|
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @option opts [String] :user_agent The `User-Agent` header of the request you are deciding on. With every field, on a paid plan or the trial, the answer then carries `user_agent`: the agent it names, and whether this address bears that out. Never kept, and nothing sent with a lookup feeds our data.
|
|
156
164
|
# @return [LookupResponse]
|
|
157
165
|
def lookup_my_ip(opts = {})
|
|
158
166
|
data, _status_code, _headers = lookup_my_ip_with_http_info(opts)
|
|
@@ -162,16 +170,22 @@ module VPNDetection
|
|
|
162
170
|
# My IP
|
|
163
171
|
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the presented key decides which fields come back, and the request counts against the same limits. The address is the one our edge observed, so a request through a proxy or a VPN reports the exit it left through rather than the machine that made it. That is usually the point of asking.
|
|
164
172
|
# @param [Hash] opts the optional parameters
|
|
173
|
+
# @option opts [String] :user_agent The `User-Agent` header of the request you are deciding on. With every field, on a paid plan or the trial, the answer then carries `user_agent`: the agent it names, and whether this address bears that out. Never kept, and nothing sent with a lookup feeds our data.
|
|
165
174
|
# @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
|
|
166
175
|
def lookup_my_ip_with_http_info(opts = {})
|
|
167
176
|
if @api_client.config.debugging
|
|
168
177
|
@api_client.config.logger.debug 'Calling API: LookupWireApi.lookup_my_ip ...'
|
|
169
178
|
end
|
|
179
|
+
if @api_client.config.client_side_validation && !opts[:'user_agent'].nil? && opts[:'user_agent'].to_s.length > 1024
|
|
180
|
+
fail ArgumentError, 'invalid value for "opts[:"user_agent"]" when calling LookupWireApi.lookup_my_ip, the character length must be smaller than or equal to 1024.'
|
|
181
|
+
end
|
|
182
|
+
|
|
170
183
|
# resource path
|
|
171
184
|
local_var_path = '/myip'
|
|
172
185
|
|
|
173
186
|
# query parameters
|
|
174
187
|
query_params = opts[:query_params] || {}
|
|
188
|
+
query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
175
189
|
|
|
176
190
|
# header parameters
|
|
177
191
|
header_params = opts[:header_params] || {}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Organization
|
|
23
|
-
# The organization this credential is scoped to. A credential belongs to one organization, so this takes no ID.
|
|
23
|
+
# The organization this credential is scoped to. A credential belongs to one organization, so this takes no ID. Needs the `org.read` scope.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [AccountOrgWrap]
|
|
26
26
|
def account_org(opts = {})
|
|
@@ -29,7 +29,7 @@ module VPNDetection
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Organization
|
|
32
|
-
# The organization this credential is scoped to. A credential belongs to one organization, so this takes no ID.
|
|
32
|
+
# The organization this credential is scoped to. A credential belongs to one organization, so this takes no ID. Needs the `org.read` scope.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(AccountOrgWrap, Integer, Hash)>] AccountOrgWrap data, response status code and response headers
|
|
35
35
|
def account_org_with_http_info(opts = {})
|
|
@@ -77,7 +77,7 @@ module VPNDetection
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
# Members
|
|
80
|
-
# The members of the organization this credential is scoped to. Read-only. Members are invited by email from the console.
|
|
80
|
+
# The members of the organization this credential is scoped to. Read-only. Members are invited by email from the console. Needs the `org.read` scope.
|
|
81
81
|
# @param [Hash] opts the optional parameters
|
|
82
82
|
# @return [AccountRc]
|
|
83
83
|
def account_org_members(opts = {})
|
|
@@ -86,7 +86,7 @@ module VPNDetection
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
# Members
|
|
89
|
-
# The members of the organization this credential is scoped to. Read-only. Members are invited by email from the console.
|
|
89
|
+
# The members of the organization this credential is scoped to. Read-only. Members are invited by email from the console. Needs the `org.read` scope.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
91
|
# @return [Array<(AccountRc, Integer, Hash)>] AccountRc data, response status code and response headers
|
|
92
92
|
def account_org_members_with_http_info(opts = {})
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -177,7 +177,7 @@ module VPNDetection
|
|
|
177
177
|
@ignore_operation_servers = false
|
|
178
178
|
@inject_format = false
|
|
179
179
|
@force_ending_format = false
|
|
180
|
-
@logger = defined?(::Rails) ? ::Rails.logger : Logger.new(STDOUT)
|
|
180
|
+
@logger = defined?(::Rails) && ::Rails.respond_to?(:logger) ? ::Rails.logger : Logger.new(STDOUT)
|
|
181
181
|
|
|
182
182
|
yield(self) if block_given?
|
|
183
183
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -127,10 +127,14 @@ module VPNDetection
|
|
|
127
127
|
|
|
128
128
|
if attributes.key?(:'country')
|
|
129
129
|
self.country = attributes[:'country']
|
|
130
|
+
else
|
|
131
|
+
self.country = nil
|
|
130
132
|
end
|
|
131
133
|
|
|
132
134
|
if attributes.key?(:'rpki_status')
|
|
133
135
|
self.rpki_status = attributes[:'rpki_status']
|
|
136
|
+
else
|
|
137
|
+
self.rpki_status = nil
|
|
134
138
|
end
|
|
135
139
|
end
|
|
136
140
|
|
|
@@ -159,6 +163,14 @@ module VPNDetection
|
|
|
159
163
|
invalid_properties.push('invalid value for "prefix", prefix cannot be nil.')
|
|
160
164
|
end
|
|
161
165
|
|
|
166
|
+
if @country.nil?
|
|
167
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if @rpki_status.nil?
|
|
171
|
+
invalid_properties.push('invalid value for "rpki_status", rpki_status cannot be nil.')
|
|
172
|
+
end
|
|
173
|
+
|
|
162
174
|
invalid_properties
|
|
163
175
|
end
|
|
164
176
|
|
|
@@ -171,6 +183,8 @@ module VPNDetection
|
|
|
171
183
|
return false if @domain.nil?
|
|
172
184
|
return false if @type.nil?
|
|
173
185
|
return false if @prefix.nil?
|
|
186
|
+
return false if @country.nil?
|
|
187
|
+
return false if @rpki_status.nil?
|
|
174
188
|
true
|
|
175
189
|
end
|
|
176
190
|
|
|
@@ -224,6 +238,26 @@ module VPNDetection
|
|
|
224
238
|
@prefix = prefix
|
|
225
239
|
end
|
|
226
240
|
|
|
241
|
+
# Custom attribute writer method with validation
|
|
242
|
+
# @param [Object] country Value to be assigned
|
|
243
|
+
def country=(country)
|
|
244
|
+
if country.nil?
|
|
245
|
+
fail ArgumentError, 'country cannot be nil'
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
@country = country
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Custom attribute writer method with validation
|
|
252
|
+
# @param [Object] rpki_status Value to be assigned
|
|
253
|
+
def rpki_status=(rpki_status)
|
|
254
|
+
if rpki_status.nil?
|
|
255
|
+
fail ArgumentError, 'rpki_status cannot be nil'
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
@rpki_status = rpki_status
|
|
259
|
+
end
|
|
260
|
+
|
|
227
261
|
# Checks equality by comparing each attribute.
|
|
228
262
|
# @param [Object] Object to be compared
|
|
229
263
|
def ==(o)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -18,10 +18,14 @@ module VPNDetection
|
|
|
18
18
|
# The addresses to classify, 1 to 1000 per call, counted before duplicates collapse. Each distinct string is one lookup.
|
|
19
19
|
attr_accessor :ips
|
|
20
20
|
|
|
21
|
+
# Each address's `User-Agent`, keyed by the string it is sent as in `ips`. With every field, that address's answer then carries `user_agent`, as a single lookup's does. Never kept.
|
|
22
|
+
attr_accessor :user_agents
|
|
23
|
+
|
|
21
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
25
|
def self.attribute_map
|
|
23
26
|
{
|
|
24
|
-
:'ips' => :'ips'
|
|
27
|
+
:'ips' => :'ips',
|
|
28
|
+
:'user_agents' => :'user_agents'
|
|
25
29
|
}
|
|
26
30
|
end
|
|
27
31
|
|
|
@@ -38,7 +42,8 @@ module VPNDetection
|
|
|
38
42
|
# Attribute type mapping.
|
|
39
43
|
def self.openapi_types
|
|
40
44
|
{
|
|
41
|
-
:'ips' => :'Array<String>'
|
|
45
|
+
:'ips' => :'Array<String>',
|
|
46
|
+
:'user_agents' => :'Hash<String, String>'
|
|
42
47
|
}
|
|
43
48
|
end
|
|
44
49
|
|
|
@@ -71,6 +76,12 @@ module VPNDetection
|
|
|
71
76
|
else
|
|
72
77
|
self.ips = nil
|
|
73
78
|
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'user_agents')
|
|
81
|
+
if (value = attributes[:'user_agents']).is_a?(Hash)
|
|
82
|
+
self.user_agents = value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
74
85
|
end
|
|
75
86
|
|
|
76
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -126,7 +137,8 @@ module VPNDetection
|
|
|
126
137
|
def ==(o)
|
|
127
138
|
return true if self.equal?(o)
|
|
128
139
|
self.class == o.class &&
|
|
129
|
-
ips == o.ips
|
|
140
|
+
ips == o.ips &&
|
|
141
|
+
user_agents == o.user_agents
|
|
130
142
|
end
|
|
131
143
|
|
|
132
144
|
# @see the `==` method
|
|
@@ -138,7 +150,7 @@ module VPNDetection
|
|
|
138
150
|
# Calculates hash code according to all attributes.
|
|
139
151
|
# @return [Integer] Hash code
|
|
140
152
|
def hash
|
|
141
|
-
[ips].hash
|
|
153
|
+
[ips, user_agents].hash
|
|
142
154
|
end
|
|
143
155
|
|
|
144
156
|
# Builds the object from hash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). 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.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.21
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|