internetdata 2.15.0 → 2.16.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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -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 +3 -3
  8. data/lib/internetdata/configuration.rb +1 -1
  9. data/lib/internetdata/models/abuse_contact.rb +1 -1
  10. data/lib/internetdata/models/asn.rb +35 -1
  11. data/lib/internetdata/models/asn_hosted_domains.rb +1 -1
  12. data/lib/internetdata/models/asn_lookup_response.rb +1 -1
  13. data/lib/internetdata/models/asn_prefix.rb +1 -1
  14. data/lib/internetdata/models/batch_lookup_error.rb +1 -1
  15. data/lib/internetdata/models/bit_torrent_detail.rb +1 -1
  16. data/lib/internetdata/models/bot_detail.rb +242 -0
  17. data/lib/internetdata/models/carrier_detail.rb +1 -1
  18. data/lib/internetdata/models/class_detail.rb +1 -1
  19. data/lib/internetdata/models/client_registration.rb +1 -1
  20. data/lib/internetdata/models/cohosted_domains.rb +1 -1
  21. data/lib/internetdata/models/company.rb +1 -1
  22. data/lib/internetdata/models/database.rb +1 -1
  23. data/lib/internetdata/models/database_checksums_response.rb +1 -1
  24. data/lib/internetdata/models/database_format.rb +1 -1
  25. data/lib/internetdata/models/database_list.rb +1 -1
  26. data/lib/internetdata/models/database_metadata.rb +1 -1
  27. data/lib/internetdata/models/database_metadata_column.rb +1 -1
  28. data/lib/internetdata/models/database_version.rb +1 -1
  29. data/lib/internetdata/models/db_checksums.rb +1 -1
  30. data/lib/internetdata/models/device_authorization.rb +1 -1
  31. data/lib/internetdata/models/disposable_detail.rb +1 -1
  32. data/lib/internetdata/models/dns_address_record.rb +1 -1
  33. data/lib/internetdata/models/dns_cname_record.rb +1 -1
  34. data/lib/internetdata/models/dns_mx_record.rb +1 -1
  35. data/lib/internetdata/models/dns_ns_record.rb +1 -1
  36. data/lib/internetdata/models/dns_resolver_detail.rb +1 -1
  37. data/lib/internetdata/models/domain_backlinks.rb +1 -1
  38. data/lib/internetdata/models/domain_dns.rb +1 -1
  39. data/lib/internetdata/models/domain_host.rb +1 -1
  40. data/lib/internetdata/models/domain_ip_range.rb +1 -1
  41. data/lib/internetdata/models/domain_ip_ranges.rb +1 -1
  42. data/lib/internetdata/models/domain_lookup_response.rb +1 -1
  43. data/lib/internetdata/models/domain_redirects.rb +1 -1
  44. data/lib/internetdata/models/domain_web.rb +1 -1
  45. data/lib/internetdata/models/domain_web_links.rb +1 -1
  46. data/lib/internetdata/models/download.rb +1 -1
  47. data/lib/internetdata/models/download_list.rb +1 -1
  48. data/lib/internetdata/models/entitlement.rb +1 -1
  49. data/lib/internetdata/models/entitlement_apikey.rb +1 -1
  50. data/lib/internetdata/models/entitlement_plan.rb +1 -1
  51. data/lib/internetdata/models/entitlement_usage.rb +1 -1
  52. data/lib/internetdata/models/error_envelope.rb +1 -1
  53. data/lib/internetdata/models/hosted_domains.rb +1 -1
  54. data/lib/internetdata/models/location.rb +1 -1
  55. data/lib/internetdata/models/lookup_response.rb +49 -2
  56. data/lib/internetdata/models/oauth_metadata.rb +1 -1
  57. data/lib/internetdata/models/proxy_detail.rb +1 -1
  58. data/lib/internetdata/models/pubproxy_detail.rb +1 -1
  59. data/lib/internetdata/models/rwhois.rb +1 -1
  60. data/lib/internetdata/models/satellite_detail.rb +1 -1
  61. data/lib/internetdata/models/smtp_detail.rb +1 -1
  62. data/lib/internetdata/models/ssh_detail.rb +1 -1
  63. data/lib/internetdata/models/standing.rb +1 -1
  64. data/lib/internetdata/models/token_response.rb +1 -1
  65. data/lib/internetdata/models/user_agent_verdict.rb +243 -0
  66. data/lib/internetdata/models/web_detail.rb +1 -1
  67. data/lib/internetdata/models/whois.rb +1 -1
  68. data/lib/internetdata/result.rb +24 -4
  69. data/lib/internetdata/transport.rb +6 -3
  70. data/lib/internetdata/version.rb +1 -1
  71. metadata +3 -1
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #InternetData API
3
+
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
+
6
+ The version of the OpenAPI document: 2026.11.21
7
+ Contact: support@internetdata.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module InternetData
17
+ class UserAgentVerdict < ApiModelBase
18
+ # The agent the user agent names, such as `Googlebot` or `Chrome`; `Unknown` where it names none.
19
+ attr_accessor :agent
20
+
21
+ # `browser`, `inapp`, `automation`, `bot`, `ai-bot`, `http-client` or `unknown`: what kind of client the user agent says it is.
22
+ attr_accessor :kind
23
+
24
+ # `verified`: the agent's operator vouches for this address as it. `spoofed`: the operator of a bot that publishes its addresses, or whose registered space it uses, does not vouch for this one, or this address posed as the bot before. `unverifiable`: a bot no published list or registered space can confirm. `not_bot`: a browser, an app or a script.
25
+ attr_accessor :verdict
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'agent' => :'agent',
53
+ :'kind' => :'kind',
54
+ :'verdict' => :'verdict'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'agent' => :'String',
72
+ :'kind' => :'String',
73
+ :'verdict' => :'String'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::UserAgentVerdict` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::UserAgentVerdict`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'agent')
100
+ self.agent = attributes[:'agent']
101
+ else
102
+ self.agent = nil
103
+ end
104
+
105
+ if attributes.key?(:'kind')
106
+ self.kind = attributes[:'kind']
107
+ else
108
+ self.kind = nil
109
+ end
110
+
111
+ if attributes.key?(:'verdict')
112
+ self.verdict = attributes[:'verdict']
113
+ else
114
+ self.verdict = nil
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
+ invalid_properties = Array.new
123
+ if @agent.nil?
124
+ invalid_properties.push('invalid value for "agent", agent cannot be nil.')
125
+ end
126
+
127
+ if @kind.nil?
128
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
129
+ end
130
+
131
+ if @verdict.nil?
132
+ invalid_properties.push('invalid value for "verdict", verdict cannot be nil.')
133
+ end
134
+
135
+ invalid_properties
136
+ end
137
+
138
+ # Check to see if the all the properties in the model are valid
139
+ # @return true if the model is valid
140
+ def valid?
141
+ warn '[DEPRECATED] the `valid?` method is obsolete'
142
+ return false if @agent.nil?
143
+ return false if @kind.nil?
144
+ return false if @verdict.nil?
145
+ verdict_validator = EnumAttributeValidator.new('String', ["verified", "spoofed", "unverifiable", "not_bot"])
146
+ return false unless verdict_validator.valid?(@verdict)
147
+ true
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] agent Value to be assigned
152
+ def agent=(agent)
153
+ if agent.nil?
154
+ fail ArgumentError, 'agent cannot be nil'
155
+ end
156
+
157
+ @agent = agent
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] kind Value to be assigned
162
+ def kind=(kind)
163
+ if kind.nil?
164
+ fail ArgumentError, 'kind cannot be nil'
165
+ end
166
+
167
+ @kind = kind
168
+ end
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] verdict Object to be assigned
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
+ @verdict = verdict
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ agent == o.agent &&
186
+ kind == o.kind &&
187
+ verdict == o.verdict
188
+ end
189
+
190
+ # @see the `==` method
191
+ # @param [Object] Object to be compared
192
+ def eql?(o)
193
+ self == o
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ def hash
199
+ [agent, kind, verdict].hash
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def self.build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ transformed_hash = {}
209
+ openapi_types.each_pair do |key, type|
210
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = nil
212
+ elsif type =~ /\AArray<(.*)>/i
213
+ # check to ensure the input is an array given that the attribute
214
+ # is documented as an array but the input is not
215
+ if attributes[attribute_map[key]].is_a?(Array)
216
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
217
+ end
218
+ elsif !attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
220
+ end
221
+ end
222
+ new(transformed_hash)
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ end
242
+
243
+ 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.20
6
+ The version of the OpenAPI document: 2026.11.21
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.20
6
+ The version of the OpenAPI document: 2026.11.21
7
7
  Contact: support@internetdata.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -68,14 +68,14 @@ module InternetData
68
68
  include Answer
69
69
 
70
70
  FLAGS = %w[
71
- is_vpn is_tor is_relay is_resproxy is_dcproxy is_mobproxy is_pubproxy is_hosting is_cdn is_anycast
72
- is_carrier is_satellite is_ssh is_smtp is_web is_dns_resolver is_bittorrent
71
+ is_vpn is_tor is_relay is_resproxy is_dcproxy is_mobproxy is_pubproxy is_hosting is_cdn is_bot
72
+ is_anycast is_carrier is_satellite is_ssh is_smtp is_web is_dns_resolver is_bittorrent
73
73
  ].freeze
74
74
 
75
75
  # The detail object behind each flag that has one; `is_anycast` has none.
76
76
  DETAILS = %w[
77
- vpn tor relay resproxy dcproxy mobproxy pubproxy hosting cdn carrier satellite ssh smtp dns_resolver
78
- bittorrent
77
+ vpn tor relay resproxy dcproxy mobproxy pubproxy hosting cdn bot carrier satellite ssh smtp
78
+ dns_resolver bittorrent
79
79
  ].freeze
80
80
 
81
81
  # The details that are a list of rows rather than one object.
@@ -198,6 +198,18 @@ module InternetData
198
198
  @raw['is_cdn'] == true
199
199
  end
200
200
 
201
+ # Whether an automated client uses the address (Bot IP): a search engine's or
202
+ # an AI company's crawler, an uptime monitor, an internet scanner or a
203
+ # webhook sender. Every answer; `bot` says whose.
204
+ def is_bot
205
+ @raw['is_bot']
206
+ end
207
+
208
+ # `is_bot` with an absent member read as false.
209
+ def bot?
210
+ @raw['is_bot'] == true
211
+ end
212
+
201
213
  # Whether the address is announced from many places at once (Anycast IP).
202
214
  # Every answer.
203
215
  def is_anycast
@@ -329,6 +341,14 @@ module InternetData
329
341
  @raw['cdn']
330
342
  end
331
343
 
344
+ # Detail for `is_bot`: whose bot uses the address (`provider`,
345
+ # `provider_name`), its bots as their user agents name them (`agents`), what
346
+ # they do (`categories`) and whether the operator vouches for the address
347
+ # (`verified`, `identity`, `verified_by`). Paid plans and the trial.
348
+ def bot
349
+ @raw['bot']
350
+ end
351
+
332
352
  # Detail for `is_carrier`. Paid plans and the trial.
333
353
  def carrier
334
354
  @raw['carrier']
@@ -357,8 +357,9 @@ module InternetData
357
357
  # is `{}` under a false flag. test/database_test.rb holds this to
358
358
  # spec/openapi.yaml.
359
359
  REQUIRED = {
360
- 'LookupResponse' => %i[ip is_bogon is_tor is_relay is_anycast is_carrier is_satellite is_ssh is_smtp
361
- is_web is_dns_resolver is_bittorrent tor relay location asn company hostname abuse],
360
+ 'LookupResponse' => %i[ip is_bogon is_tor is_relay is_bot is_anycast is_carrier is_satellite is_ssh
361
+ is_smtp is_web is_dns_resolver is_bittorrent tor relay location asn company hostname
362
+ abuse],
362
363
  'ClassDetail' => [],
363
364
  'ProxyDetail' => [],
364
365
  'PubproxyDetail' => [],
@@ -370,9 +371,11 @@ module InternetData
370
371
  cert_subject_o cert_issuer_dn cert_browser_trusted tls_version first_seen last_seen],
371
372
  'DnsResolverDetail' => [],
372
373
  'BitTorrentDetail' => [],
374
+ 'BotDetail' => [],
375
+ 'UserAgentVerdict' => %i[agent kind verdict],
373
376
  'Location' => %i[continent continent_name country country_name timezone currency_code currency_name
374
377
  currency_symbol flag_emoji flag_unicode],
375
- 'Asn' => %i[asn name domain type prefix],
378
+ 'Asn' => %i[asn name domain type prefix country rpki_status],
376
379
  'Company' => %i[name domain],
377
380
  'AbuseContact' => %i[email],
378
381
  'Whois' => %i[id name org country status source domain abuse_email asn],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InternetData
4
- VERSION = '2.15.0'
4
+ VERSION = '2.16.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.15.0
4
+ version: 2.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev
@@ -72,6 +72,7 @@ files:
72
72
  - lib/internetdata/models/asn_prefix.rb
73
73
  - lib/internetdata/models/batch_lookup_error.rb
74
74
  - lib/internetdata/models/bit_torrent_detail.rb
75
+ - lib/internetdata/models/bot_detail.rb
75
76
  - lib/internetdata/models/carrier_detail.rb
76
77
  - lib/internetdata/models/class_detail.rb
77
78
  - lib/internetdata/models/client_registration.rb
@@ -120,6 +121,7 @@ files:
120
121
  - lib/internetdata/models/ssh_detail.rb
121
122
  - lib/internetdata/models/standing.rb
122
123
  - lib/internetdata/models/token_response.rb
124
+ - lib/internetdata/models/user_agent_verdict.rb
123
125
  - lib/internetdata/models/web_detail.rb
124
126
  - lib/internetdata/models/whois.rb
125
127
  - lib/internetdata/oauth_api.rb