internetdata 2.6.2 → 2.6.4
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 +1 -1
- data/lib/internetdata/api/database_v2_api.rb +1 -1
- data/lib/internetdata/api_client.rb +1 -1
- data/lib/internetdata/api_error.rb +1 -1
- data/lib/internetdata/api_model_base.rb +1 -1
- data/lib/internetdata/configuration.rb +1 -1
- data/lib/internetdata/models/database.rb +1 -1
- data/lib/internetdata/models/database_checksums_response.rb +1 -1
- data/lib/internetdata/models/database_format.rb +1 -1
- data/lib/internetdata/models/database_list.rb +1 -1
- data/lib/internetdata/models/database_metadata.rb +1 -1
- data/lib/internetdata/models/database_metadata_column.rb +1 -1
- data/lib/internetdata/models/database_version.rb +1 -1
- data/lib/internetdata/models/db_checksums.rb +1 -1
- data/lib/internetdata/models/device_authorization.rb +1 -1
- data/lib/internetdata/models/download.rb +1 -1
- data/lib/internetdata/models/download_list.rb +1 -1
- data/lib/internetdata/models/error_envelope.rb +1 -1
- data/lib/internetdata/models/oauth_metadata.rb +1 -1
- data/lib/internetdata/models/standing.rb +1 -1
- data/lib/internetdata/models/token_response.rb +1 -1
- data/lib/internetdata/transport.rb +45 -2
- data/lib/internetdata/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afd47ed11a5c7584109ee4cd24d9a80355735d93ab75f34b2e259d00c7bf5a1c
|
|
4
|
+
data.tar.gz: b1e54653b61eecfc115d38f31479419189ceef73892117c392340c07edfd7b7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2103eda9f58619d97eea99a26cba2eabdb00f766a4a2baaa2b71c17f1bffb5bc10f34ea322e5614010d8e8a65d27afb7b9371d2cbe4249187363aabb225e7581
|
|
7
|
+
data.tar.gz: e2997411f2e09d36b335c0c55ad1a2e8a9df52e1b413ad686502c712536d587cd16f50b391b07d7500602e0bfd90733a4148c69109cc6cb5a5798139125ac417
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Requires Ruby 3.3 or newer.
|
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
|
-
Every database published today needs an API key carrying the `db.download` scope.
|
|
26
|
+
Every database published today needs an API key carrying the `db.download` scope. The Open databases are licensed to every organization from the start and are free under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/), and `list` marks them `open`. The rest are licensed by contract, one family at a time: if your organization doesn't have a license yet, [request an evaluation](https://internetdata.io/contact?purpose=evaluation&subject=Evaluation+license). `api_key:` is nevertheless optional - a client built without one sends no `Authorization` header at all, ready for a database served without a license.
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
29
|
require 'internetdata'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.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 InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.10.
|
|
6
|
+
The version of the OpenAPI document: 2026.10.15
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -90,11 +90,17 @@ module InternetData
|
|
|
90
90
|
# the spec requires. The generated reader raised a RuntimeError, a
|
|
91
91
|
# JSON::ParserError or an ArgumentError for those, none of them retried, and
|
|
92
92
|
# handed an empty or non-object body back as nil, as if it were the answer.
|
|
93
|
+
#
|
|
94
|
+
# Every member present is checked against the type the spec gives it before
|
|
95
|
+
# the answer is handed back: the generated reader converts with `to_i` and
|
|
96
|
+
# `to_s`, so `"version":"x"` came back as version 0 and `"version":"3"` as 3,
|
|
97
|
+
# as if either were the answer (2.6.3, measured 2026-10-16).
|
|
93
98
|
def deserialize(response, return_type)
|
|
94
99
|
data = super
|
|
95
|
-
|
|
100
|
+
raise Error.new(:server_error, "the API answered with no #{return_type}", status: response.code) if data.nil?
|
|
96
101
|
|
|
97
|
-
|
|
102
|
+
check_type!(JSON.parse(response.body, symbolize_names: true), return_type.to_s, 'the answer') if return_type
|
|
103
|
+
data
|
|
98
104
|
rescue Error
|
|
99
105
|
raise
|
|
100
106
|
rescue StandardError => e
|
|
@@ -189,5 +195,42 @@ module InternetData
|
|
|
189
195
|
end
|
|
190
196
|
|
|
191
197
|
private_class_method :transport_failure?, :parse_object, :oauth_refusal
|
|
198
|
+
|
|
199
|
+
private
|
|
200
|
+
|
|
201
|
+
# True when `value` has the generated `type`, a model's members recursively;
|
|
202
|
+
# raises TypeError naming where it does not. A null is left to the models'
|
|
203
|
+
# own required-member checks.
|
|
204
|
+
def check_type!(value, type, where)
|
|
205
|
+
return true if value.nil?
|
|
206
|
+
|
|
207
|
+
typed =
|
|
208
|
+
case type
|
|
209
|
+
when 'String', 'Date', 'Time' then value.is_a?(String)
|
|
210
|
+
when 'Integer' then value.is_a?(Integer)
|
|
211
|
+
when 'Float' then value.is_a?(Numeric)
|
|
212
|
+
when 'Boolean' then [true, false].include?(value)
|
|
213
|
+
when 'Object' then true
|
|
214
|
+
when /\AArray<(?<inner>.+)>\z/
|
|
215
|
+
inner = Regexp.last_match(:inner)
|
|
216
|
+
value.is_a?(Array) && value.each_with_index.all? { |v, i| check_type!(v, inner, "#{where}[#{i}]") }
|
|
217
|
+
when /\AHash<String, ?(?<inner>.+)>\z/
|
|
218
|
+
inner = Regexp.last_match(:inner)
|
|
219
|
+
value.is_a?(Hash) && value.all? { |k, v| check_type!(v, inner, "#{where}.#{k}") }
|
|
220
|
+
else
|
|
221
|
+
model = InternetData.const_get(type)
|
|
222
|
+
if model.respond_to?(:openapi_types)
|
|
223
|
+
value.is_a?(Hash) && model.openapi_types.all? do |attr, member|
|
|
224
|
+
key = model.attribute_map[attr]
|
|
225
|
+
check_type!(value[key], member.to_s, "#{where}.#{key}")
|
|
226
|
+
end
|
|
227
|
+
else
|
|
228
|
+
value.is_a?(String) # an enum
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
return true if typed
|
|
232
|
+
|
|
233
|
+
raise TypeError, "#{where} is not a #{type}"
|
|
234
|
+
end
|
|
192
235
|
end
|
|
193
236
|
end
|
data/lib/internetdata/version.rb
CHANGED