internetdata 2.8.0 → 2.8.2
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 -2
- 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/errors.rb +4 -2
- data/lib/internetdata/models/client_registration.rb +2 -2
- 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 +33 -7
- 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: 7d3e5a062df6437136402c90240f234437b93f6ce85ea1ffb60503c7adbcce1c
|
|
4
|
+
data.tar.gz: f3a9930a8eaecf8613154ae49cc4a8a85850b1e19b3077036ab46e4968657ea2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61735554381aca9b15635a4cd43205d46008c95eaadf704c547ca2f8af2157ca1b0bd1c21bfbe0c2f952f06ff3cc1256ef39d63db6a72e346bbf1f3685295263
|
|
7
|
+
data.tar.gz: a8f9d87c87dff2c4b824e0d17f1e63a98e057e47abb24f8375c230d476a69fe9e5bf284a1882390f436700ddfff730b5849f5cede27602fd40439b8d78aa5f46
|
data/README.md
CHANGED
|
@@ -156,12 +156,11 @@ Check that `state` came back as you sent it before you exchange `code`, which wo
|
|
|
156
156
|
|
|
157
157
|
### Register a client
|
|
158
158
|
|
|
159
|
-
An app with no client ID, and no client metadata document to use as one, registers itself
|
|
159
|
+
An app with no client ID, and no client metadata document to use as one, registers itself, then signs in with the `client_id` it gets back as the client ID for `authorization_url` and `exchange_authorization_code`:
|
|
160
160
|
|
|
161
161
|
```ruby
|
|
162
162
|
client = InternetData::Client.new
|
|
163
163
|
registration = client.oauth.register(['http://127.0.0.1:8765/callback'], client_name: 'Your App')
|
|
164
|
-
# registration.client_id is the client ID for authorization_url and exchange_authorization_code.
|
|
165
164
|
```
|
|
166
165
|
|
|
167
166
|
Each redirect URI must be https on a public host name, or http on a loopback address, which then matches any port. Nothing is kept until a person approves the client, so an app with no client ID saved can simply register again.
|
|
@@ -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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
data/lib/internetdata/errors.rb
CHANGED
|
@@ -100,9 +100,11 @@ module InternetData
|
|
|
100
100
|
return nil if value.empty?
|
|
101
101
|
return Integer(value, 10) if value.match?(/\A\d+\z/)
|
|
102
102
|
|
|
103
|
-
# The header also permits an HTTP date.
|
|
103
|
+
# The header also permits an HTTP date, naming a real day: `Time.httpdate`
|
|
104
|
+
# reads `31 Nov` as 1 December, and the day it names comes first in all
|
|
105
|
+
# three forms.
|
|
104
106
|
when_at = Time.httpdate(value) rescue nil
|
|
105
|
-
return nil if when_at.nil?
|
|
107
|
+
return nil if when_at.nil? || when_at.day != value[/\d+/].to_i
|
|
106
108
|
|
|
107
109
|
[0, (when_at - Time.now).ceil].max
|
|
108
110
|
end
|
|
@@ -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.18
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -17,7 +17,7 @@ module InternetData
|
|
|
17
17
|
class ClientRegistration < ApiModelBase
|
|
18
18
|
attr_accessor :client_id
|
|
19
19
|
|
|
20
|
-
# Unix seconds.
|
|
20
|
+
# Unix seconds. 64-bit, since 32 bits run out on 2038-01-19.
|
|
21
21
|
attr_accessor :client_id_issued_at
|
|
22
22
|
|
|
23
23
|
# As the person will see it.
|
|
@@ -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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -198,13 +198,31 @@ module InternetData
|
|
|
198
198
|
|
|
199
199
|
private_class_method :transport_failure?, :parse_object, :oauth_refusal
|
|
200
200
|
|
|
201
|
+
# The members the spec requires of each answer a database call reads. One of
|
|
202
|
+
# them that is not nullable must be there and not null: the generated reader
|
|
203
|
+
# skips the writer of a list or map member that is not one, so `"versions":
|
|
204
|
+
# null` came back as a family with no versions (2.8.1, measured 2026-10-19).
|
|
205
|
+
# test/database_test.rb holds this to spec/openapi.yaml.
|
|
206
|
+
REQUIRED = {
|
|
207
|
+
'DatabaseList' => %i[databases],
|
|
208
|
+
'Database' => %i[base name summary standing open license_type starts expires renews_at notice_due_at versions],
|
|
209
|
+
'DatabaseVersion' => %i[id version summary formats],
|
|
210
|
+
'DatabaseMetadata' => %i[id updated entries schema size],
|
|
211
|
+
'DatabaseMetadataColumn' => %i[name type],
|
|
212
|
+
'DatabaseChecksumsResponse' => %i[id format checksums],
|
|
213
|
+
'DbChecksums' => %i[md5 sha1 sha256 sha512],
|
|
214
|
+
'DownloadList' => %i[downloads],
|
|
215
|
+
'Download' => %i[dataset_id format outcome sample open bytes http_status apikey_id client_ip user_agent created],
|
|
216
|
+
}.freeze
|
|
217
|
+
|
|
201
218
|
private
|
|
202
219
|
|
|
203
220
|
# True when `value` has the generated `type`, a model's members recursively;
|
|
204
|
-
# raises TypeError naming where it does not.
|
|
205
|
-
#
|
|
221
|
+
# raises TypeError naming where it does not. No list entry or map value the
|
|
222
|
+
# spec describes may be null, and through 2.8.1 one came back as nil, or as 0
|
|
223
|
+
# in `size`.
|
|
206
224
|
def check_type!(value, type, where)
|
|
207
|
-
|
|
225
|
+
raise TypeError, "#{where} is null" if value.nil?
|
|
208
226
|
|
|
209
227
|
typed =
|
|
210
228
|
case type
|
|
@@ -222,10 +240,7 @@ module InternetData
|
|
|
222
240
|
else
|
|
223
241
|
model = InternetData.const_get(type)
|
|
224
242
|
if model.respond_to?(:openapi_types)
|
|
225
|
-
value.is_a?(Hash) && model.openapi_types.all?
|
|
226
|
-
key = model.attribute_map[attr]
|
|
227
|
-
check_type!(value[key], member.to_s, "#{where}.#{key}")
|
|
228
|
-
end
|
|
243
|
+
value.is_a?(Hash) && model.openapi_types.all? { |attr, member| check_member!(model, attr, member, value, where) }
|
|
229
244
|
else
|
|
230
245
|
value.is_a?(String) # an enum
|
|
231
246
|
end
|
|
@@ -234,5 +249,16 @@ module InternetData
|
|
|
234
249
|
|
|
235
250
|
raise TypeError, "#{where} is not a #{type}"
|
|
236
251
|
end
|
|
252
|
+
|
|
253
|
+
# A member absent or null reads as absent, unless the spec requires it and
|
|
254
|
+
# does not make it nullable.
|
|
255
|
+
def check_member!(model, attr, member, value, where)
|
|
256
|
+
key = model.attribute_map[attr]
|
|
257
|
+
return check_type!(value[key], member.to_s, "#{where}.#{key}") unless value[key].nil?
|
|
258
|
+
return true unless REQUIRED.fetch(model.name.split('::').last).include?(attr)
|
|
259
|
+
return true if model.openapi_nullable.include?(attr)
|
|
260
|
+
|
|
261
|
+
raise TypeError, "#{where}.#{key} is #{value.key?(key) ? 'null' : 'missing'}"
|
|
262
|
+
end
|
|
237
263
|
end
|
|
238
264
|
end
|
data/lib/internetdata/version.rb
CHANGED