internetdata 2.18.0 → 2.20.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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/lib/internetdata/api/database_v2_api.rb +1 -1
  4. data/lib/internetdata/api_client.rb +1 -1
  5. data/lib/internetdata/api_error.rb +1 -1
  6. data/lib/internetdata/api_model_base.rb +1 -1
  7. data/lib/internetdata/cache.rb +4 -3
  8. data/lib/internetdata/configuration.rb +1 -1
  9. data/lib/internetdata/middleware/core.rb +94 -19
  10. data/lib/internetdata/middleware/crawlers.rb +74 -0
  11. data/lib/internetdata/models/abuse_contact.rb +1 -1
  12. data/lib/internetdata/models/asn.rb +2 -19
  13. data/lib/internetdata/models/asn_hosted_domains.rb +1 -1
  14. data/lib/internetdata/models/asn_lookup_response.rb +1 -1
  15. data/lib/internetdata/models/asn_prefix.rb +1 -1
  16. data/lib/internetdata/models/batch_lookup_error.rb +1 -1
  17. data/lib/internetdata/models/bit_torrent_detail.rb +1 -1
  18. data/lib/internetdata/models/bot_detail.rb +1 -1
  19. data/lib/internetdata/models/carrier_detail.rb +1 -1
  20. data/lib/internetdata/models/class_detail.rb +1 -1
  21. data/lib/internetdata/models/client_registration.rb +1 -1
  22. data/lib/internetdata/models/cohosted_domains.rb +1 -1
  23. data/lib/internetdata/models/company.rb +1 -1
  24. data/lib/internetdata/models/database.rb +1 -5
  25. data/lib/internetdata/models/database_checksums_response.rb +1 -1
  26. data/lib/internetdata/models/database_format.rb +2 -3
  27. data/lib/internetdata/models/database_list.rb +1 -1
  28. data/lib/internetdata/models/database_metadata.rb +1 -1
  29. data/lib/internetdata/models/database_metadata_column.rb +1 -1
  30. data/lib/internetdata/models/database_version.rb +1 -1
  31. data/lib/internetdata/models/db_checksums.rb +1 -1
  32. data/lib/internetdata/models/device_authorization.rb +1 -1
  33. data/lib/internetdata/models/disposable_detail.rb +1 -1
  34. data/lib/internetdata/models/dns_address_record.rb +1 -1
  35. data/lib/internetdata/models/dns_cname_record.rb +1 -1
  36. data/lib/internetdata/models/dns_mx_record.rb +1 -1
  37. data/lib/internetdata/models/dns_ns_record.rb +1 -1
  38. data/lib/internetdata/models/dns_resolver_detail.rb +1 -1
  39. data/lib/internetdata/models/domain_backlinks.rb +1 -1
  40. data/lib/internetdata/models/domain_dns.rb +1 -1
  41. data/lib/internetdata/models/domain_host.rb +1 -1
  42. data/lib/internetdata/models/domain_ip_range.rb +1 -1
  43. data/lib/internetdata/models/domain_ip_ranges.rb +1 -1
  44. data/lib/internetdata/models/domain_lookup_response.rb +1 -1
  45. data/lib/internetdata/models/domain_redirects.rb +1 -1
  46. data/lib/internetdata/models/domain_web.rb +1 -1
  47. data/lib/internetdata/models/domain_web_links.rb +1 -1
  48. data/lib/internetdata/models/download.rb +1 -5
  49. data/lib/internetdata/models/download_list.rb +1 -1
  50. data/lib/internetdata/models/entitlement.rb +1 -1
  51. data/lib/internetdata/models/entitlement_apikey.rb +1 -1
  52. data/lib/internetdata/models/entitlement_plan.rb +2 -6
  53. data/lib/internetdata/models/entitlement_usage.rb +1 -1
  54. data/lib/internetdata/models/error_envelope.rb +1 -1
  55. data/lib/internetdata/models/hosted_domains.rb +1 -1
  56. data/lib/internetdata/models/location.rb +1 -1
  57. data/lib/internetdata/models/lookup_response.rb +9 -145
  58. data/lib/internetdata/models/oauth_metadata.rb +1 -1
  59. data/lib/internetdata/models/proxy_detail.rb +1 -1
  60. data/lib/internetdata/models/pubproxy_detail.rb +1 -1
  61. data/lib/internetdata/models/rwhois.rb +1 -1
  62. data/lib/internetdata/models/satellite_detail.rb +1 -1
  63. data/lib/internetdata/models/smtp_detail.rb +1 -1
  64. data/lib/internetdata/models/ssh_detail.rb +1 -1
  65. data/lib/internetdata/models/standing.rb +2 -3
  66. data/lib/internetdata/models/token_response.rb +1 -1
  67. data/lib/internetdata/models/user_agent_verdict.rb +1 -5
  68. data/lib/internetdata/models/web_detail.rb +1 -1
  69. data/lib/internetdata/models/whois.rb +1 -1
  70. data/lib/internetdata/result.rb +17 -12
  71. data/lib/internetdata/transport.rb +16 -5
  72. data/lib/internetdata/version.rb +1 -1
  73. metadata +2 -1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, 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.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@internetdata.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -34,8 +34,7 @@ module InternetData
34
34
  # @param [String] The enum value in the form of the string
35
35
  # @return [String] The enum value
36
36
  def build_from_hash(value)
37
- return value if Standing.all_vars.include?(value)
38
- raise "Invalid ENUM value #{value} for class #Standing"
37
+ value
39
38
  end
40
39
  end
41
40
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, 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.11.25
6
+ The version of the OpenAPI document: 2026.11.27
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: look up what every database InternetData publishes says about an IP address, an AS or a domain, 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.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@internetdata.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -170,10 +170,6 @@ module InternetData
170
170
  # Custom attribute writer method checking allowed values (enum).
171
171
  # @param [Object] verdict Object to be assigned
172
172
  def verdict=(verdict)
173
- validator = EnumAttributeValidator.new('String', ["verified", "spoofed", "unverifiable", "not_bot"])
174
- unless validator.valid?(verdict)
175
- fail ArgumentError, "invalid value for \"verdict\", must be one of #{validator.allowable_values}."
176
- end
177
173
  @verdict = verdict
178
174
  end
179
175
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, 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.11.25
6
+ The version of the OpenAPI document: 2026.11.27
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: look up what every database InternetData publishes says about an IP address, an AS or a domain, 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.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@internetdata.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -200,7 +200,8 @@ module InternetData
200
200
 
201
201
  # Whether an automated client uses the address (Bot IP): a search engine's or
202
202
  # an AI company's crawler, an uptime monitor, an internet scanner or a
203
- # webhook sender. Every answer; `bot` says whose.
203
+ # webhook sender, or nil when your plan does not include it. Paid plans and
204
+ # the trial; `bot` says whose.
204
205
  def is_bot
205
206
  @raw['is_bot']
206
207
  end
@@ -221,8 +222,8 @@ module InternetData
221
222
  @raw['is_anycast'] == true
222
223
  end
223
224
 
224
- # Whether the address is in a mobile carrier's address space (Carrier IP).
225
- # Every answer.
225
+ # Whether the address is in a mobile carrier's address space (Carrier IP), or
226
+ # nil when your plan does not include it. Paid plans and the trial.
226
227
  def is_carrier
227
228
  @raw['is_carrier']
228
229
  end
@@ -233,7 +234,7 @@ module InternetData
233
234
  end
234
235
 
235
236
  # Whether the address is in a satellite operator's address space (Satellite
236
- # IP). Every answer.
237
+ # IP), or nil when your plan does not include it. Paid plans and the trial.
237
238
  def is_satellite
238
239
  @raw['is_satellite']
239
240
  end
@@ -243,7 +244,8 @@ module InternetData
243
244
  @raw['is_satellite'] == true
244
245
  end
245
246
 
246
- # Whether an SSH server answered on the address (SSH IP). Every answer.
247
+ # Whether an SSH server answered on the address (SSH IP), or nil when your
248
+ # plan does not include it. Paid plans and the trial.
247
249
  def is_ssh
248
250
  @raw['is_ssh']
249
251
  end
@@ -253,7 +255,8 @@ module InternetData
253
255
  @raw['is_ssh'] == true
254
256
  end
255
257
 
256
- # Whether a mail server answered on the address (SMTP IP). Every answer.
258
+ # Whether a mail server answered on the address (SMTP IP), or nil when your
259
+ # plan does not include it. Paid plans and the trial.
257
260
  def is_smtp
258
261
  @raw['is_smtp']
259
262
  end
@@ -263,8 +266,8 @@ module InternetData
263
266
  @raw['is_smtp'] == true
264
267
  end
265
268
 
266
- # Whether a web server answered on the address on port 80 or 443 (Web IP).
267
- # Every answer.
269
+ # Whether a web server answered on the address on port 80 or 443 (Web IP), or
270
+ # nil when your plan does not include it. Paid plans and the trial.
268
271
  def is_web
269
272
  @raw['is_web']
270
273
  end
@@ -274,8 +277,8 @@ module InternetData
274
277
  @raw['is_web'] == true
275
278
  end
276
279
 
277
- # Whether an open DNS resolver answered on the address (DNS Resolver IP).
278
- # Every answer.
280
+ # Whether an open DNS resolver answered on the address (DNS Resolver IP), or
281
+ # nil when your plan does not include it. Paid plans and the trial.
279
282
  def is_dns_resolver
280
283
  @raw['is_dns_resolver']
281
284
  end
@@ -286,7 +289,8 @@ module InternetData
286
289
  end
287
290
 
288
291
  # Whether a BitTorrent client was seen on the address in the last 90 days
289
- # (BitTorrent IP). Every answer.
292
+ # (BitTorrent IP), or nil when your plan does not include it. Paid plans and
293
+ # the trial.
290
294
  def is_bittorrent
291
295
  @raw['is_bittorrent']
292
296
  end
@@ -392,7 +396,8 @@ module InternetData
392
396
  end
393
397
 
394
398
  # The network announcing the address, from IP ASN, as a wire hash
395
- # (`result.asn['name']`), with asn 0 where none does. Every answer.
399
+ # (`result.asn['name']`), with asn 0 where none does. Every answer; the
400
+ # network's type on paid plans and the trial.
396
401
  def asn
397
402
  @raw['asn']
398
403
  end
@@ -376,8 +376,7 @@ module InternetData
376
376
  # is `{}` under a false flag. test/database_test.rb holds this to
377
377
  # spec/openapi.yaml.
378
378
  REQUIRED = {
379
- 'LookupResponse' => %i[ip is_bogon is_tor is_relay is_bot is_anycast is_carrier is_satellite is_ssh
380
- is_smtp is_web is_dns_resolver is_bittorrent tor relay location asn company hostname
379
+ 'LookupResponse' => %i[ip is_bogon is_tor is_relay is_anycast tor relay location asn company hostname
381
380
  abuse],
382
381
  'ClassDetail' => [],
383
382
  'ProxyDetail' => [],
@@ -394,7 +393,7 @@ module InternetData
394
393
  'UserAgentVerdict' => %i[agent kind verdict],
395
394
  'Location' => %i[continent continent_name country country_name timezone currency_code currency_name
396
395
  currency_symbol flag_emoji flag_unicode],
397
- 'Asn' => %i[asn name domain type prefix country rpki_status],
396
+ 'Asn' => %i[asn name domain prefix country rpki_status],
398
397
  'Company' => %i[name domain],
399
398
  'AbuseContact' => %i[email],
400
399
  'Whois' => %i[id name org country status source domain abuse_email asn],
@@ -434,6 +433,15 @@ module InternetData
434
433
  'Download' => %i[dataset_id format outcome sample open bytes http_status apikey_id client_ip user_agent created],
435
434
  }.freeze
436
435
 
436
+ # The members the spec stopped requiring in 2026.11.26, because Unlimited's answer leaves
437
+ # them out: absent reads as absent, as any member a plan leaves out does. A served null
438
+ # is still refused, as it was while they were required.
439
+ NEVER_NULL = {
440
+ 'LookupResponse' => %i[is_bot is_carrier is_satellite is_ssh is_smtp is_web is_dns_resolver
441
+ is_bittorrent],
442
+ 'Asn' => %i[type],
443
+ }.freeze
444
+
437
445
  # RFC 3339's full-date, the spec's `date`, and its date-time, the spec's
438
446
  # `date-time`, its `T` and `Z` in either case, as RFC 3339 allows: through
439
447
  # 2.8.4 a lowercase one failed the call. Anything else reached the
@@ -489,11 +497,14 @@ module InternetData
489
497
  end
490
498
 
491
499
  # A member absent or null reads as absent, unless the spec requires it and
492
- # does not make it nullable.
500
+ # does not make it nullable, or {NEVER_NULL} lists it and the answer carries it null.
493
501
  def self.check_member!(model, attr, member, value, where)
494
502
  key = model.attribute_map[attr].to_s
495
503
  return check_type!(value[key], member.to_s, "#{where}.#{key}") unless value[key].nil?
496
- return true unless REQUIRED.fetch(model.name.split('::').last).include?(attr)
504
+
505
+ name = model.name.split('::').last
506
+ null_refused = value.key?(key) && NEVER_NULL.fetch(name, []).include?(attr)
507
+ return true unless REQUIRED.fetch(name).include?(attr) || null_refused
497
508
  return true if model.openapi_nullable.include?(attr)
498
509
 
499
510
  raise TypeError, "#{where}.#{key} is #{value.key?(key) ? 'null' : 'missing'}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InternetData
4
- VERSION = '2.18.0'
4
+ VERSION = '2.20.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: internetdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.18.0
4
+ version: 2.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev
@@ -65,6 +65,7 @@ files:
65
65
  - lib/internetdata/middleware.rb
66
66
  - lib/internetdata/middleware/condition.rb
67
67
  - lib/internetdata/middleware/core.rb
68
+ - lib/internetdata/middleware/crawlers.rb
68
69
  - lib/internetdata/models/abuse_contact.rb
69
70
  - lib/internetdata/models/asn.rb
70
71
  - lib/internetdata/models/asn_hosted_domains.rb