apifreaks 1.0.2 → 1.0.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/lib/apifreaks/client.rb +329 -10
- data/lib/apifreaks/types/astronomy_lookup_response.rb +1 -1
- data/lib/apifreaks/types/astronomy_lookup_response_location.rb +7 -7
- data/lib/apifreaks/types/bulk_domain_availability_check_response.rb +1 -1
- data/lib/apifreaks/types/bulk_domain_availability_check_response_bulk_domain_available_response_item.rb +3 -3
- data/lib/apifreaks/types/bulk_domain_dns_lookup_request.rb +3 -1
- data/lib/apifreaks/types/bulk_domain_dns_lookup_response_bulk_dns_info_item.rb +4 -2
- data/lib/apifreaks/types/bulk_domain_dns_lookup_response_bulk_dns_info_item_dns_types.rb +2 -0
- data/lib/apifreaks/types/bulk_email_validate_response_email_validation_responses_item.rb +1 -1
- data/lib/apifreaks/types/bulk_email_validate_response_email_validation_responses_item_dns.rb +1 -1
- data/lib/apifreaks/types/bulk_email_validate_response_email_validation_responses_item_valid_email.rb +3 -1
- data/lib/apifreaks/types/bulk_geolocation_lookup_response_item.rb +1 -1
- data/lib/apifreaks/types/bulk_zipcode_lookup_response_results_item.rb +0 -2
- data/lib/apifreaks/types/commodity_fluctuation_request.rb +1 -1
- data/lib/apifreaks/types/commodity_fluctuation_response.rb +3 -7
- data/lib/apifreaks/types/commodity_historical_rates_request.rb +1 -1
- data/lib/apifreaks/types/commodity_historical_rates_response.rb +3 -5
- data/lib/apifreaks/types/commodity_latest_rates_request.rb +1 -1
- data/lib/apifreaks/types/commodity_latest_rates_response.rb +2 -2
- data/lib/apifreaks/types/commodity_time_series_request.rb +1 -1
- data/lib/apifreaks/types/commodity_time_series_response.rb +3 -7
- data/lib/apifreaks/types/currency_convert_by_ip_request.rb +1 -1
- data/lib/apifreaks/types/currency_convert_historical_request.rb +1 -1
- data/lib/apifreaks/types/currency_convert_latest_request.rb +1 -1
- data/lib/apifreaks/types/domain_availability_check_response.rb +2 -4
- data/lib/apifreaks/types/domain_availability_suggestions_request.rb +2 -0
- data/lib/apifreaks/types/domain_availability_suggestions_response.rb +1 -1
- data/lib/apifreaks/types/domain_availability_suggestions_response_domain_available_response_item.rb +2 -4
- data/lib/apifreaks/types/domain_dns_history_request.rb +1 -1
- data/lib/apifreaks/types/domain_dns_history_response.rb +4 -4
- data/lib/apifreaks/types/domain_dns_history_response_historical_dns_records_item.rb +0 -2
- data/lib/apifreaks/types/domain_dns_lookup_request.rb +1 -1
- data/lib/apifreaks/types/domain_dns_reverse_response_reverse_dns_records_item.rb +1 -1
- data/lib/apifreaks/types/domain_ssl_chain_lookup_response_ssl_certificates_item_extensions_authority_info_access.rb +2 -2
- data/lib/apifreaks/types/domain_ssl_chain_lookup_response_ssl_certificates_item_issuer.rb +2 -2
- data/lib/apifreaks/types/domain_ssl_lookup_response_ssl_certificates_item_extensions_authority_info_access.rb +2 -2
- data/lib/apifreaks/types/domain_ssl_lookup_response_ssl_certificates_item_issuer.rb +2 -2
- data/lib/apifreaks/types/domain_whois_history_response_whois_domains_historical_item_administrative_contact.rb +2 -2
- data/lib/apifreaks/types/domain_whois_history_response_whois_domains_historical_item_billing_contact.rb +2 -2
- data/lib/apifreaks/types/domain_whois_history_response_whois_domains_historical_item_registrant_contact.rb +2 -2
- data/lib/apifreaks/types/domain_whois_history_response_whois_domains_historical_item_technical_contact.rb +2 -2
- data/lib/apifreaks/types/domain_whois_reverse_response.rb +3 -3
- data/lib/apifreaks/types/domain_whois_reverse_response_whois_domains_historical_item_companyname.rb +1 -1
- data/lib/apifreaks/types/email_validate_response.rb +1 -1
- data/lib/apifreaks/types/email_validate_response_dns.rb +1 -1
- data/lib/apifreaks/types/email_validate_response_valid_email.rb +3 -1
- data/lib/apifreaks/types/geolocation_lookup_response.rb +1 -1
- data/lib/apifreaks/types/get_admin_unit_details_response.rb +3 -1
- data/lib/apifreaks/types/subdomains_lookup_response_subdomains_item.rb +1 -1
- data/lib/apifreaks/types/timezone_lookup_response.rb +2 -2
- data/lib/apifreaks/types/timezone_lookup_response_airport_details.rb +12 -12
- data/lib/apifreaks/types/timezone_lookup_response_lo_code_details.rb +8 -8
- data/lib/apifreaks/types/timezone_lookup_response_time_zone.rb +2 -10
- data/lib/apifreaks/types/user_agent_lookup_request.rb +2 -0
- data/lib/apifreaks/types/vat_validate_response.rb +2 -2
- data/lib/apifreaks/types/zipcode_distance_match_response.rb +1 -1
- data/lib/apifreaks/types/zipcode_distance_response.rb +1 -1
- data/lib/apifreaks/types/zipcode_lookup_response_results_item.rb +0 -2
- data/lib/apifreaks/types/zipcode_search_by_radius_response_results_item.rb +0 -2
- data/lib/apifreaks/version.rb +1 -1
- data/lib/apifreaks.rb +0 -3
- data/reference.md +825 -129
- metadata +3 -9
- data/lib/apifreaks/types/commodity_fluctuation_response_rates_value.rb +0 -15
- data/lib/apifreaks/types/commodity_historical_rates_response_rates_value.rb +0 -17
- data/lib/apifreaks/types/commodity_time_series_response_rates_value_value.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32a9d6da3816e2830785311c2f784b7852bd1c0fbceaf4d316cb677adc5d0c71
|
|
4
|
+
data.tar.gz: 3eaf9e81c889241b65bc6d7f42237bc59dabd1d48d0d3e5080db015eec109243
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4d6c4bd6f0720106c69b6e047ee116cc780e9d676e9720ea3d9b731607144707f1a74ca3643ac4c6127962bd55d72810ce4dd0ef2ec89bbe96aecb684640379
|
|
7
|
+
data.tar.gz: ebd9dacecf79c2c401d3cbc8feee725f2aa3ccdc1006f4f2cf19777c11f1e9995523e9eef2235c13ed53196a78ac2ea40c2a47a4ac42abb5270769a42a775044
|
data/lib/apifreaks/client.rb
CHANGED
|
@@ -53,6 +53,57 @@ module Apifreaks
|
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
+
# Get detailed geolocation data for an IP address (v2.0) including country, city, timezone, currency, and optional
|
|
57
|
+
# security and user-agent information
|
|
58
|
+
#
|
|
59
|
+
# @param request_options [Hash]
|
|
60
|
+
# @param params [Hash]
|
|
61
|
+
# @option request_options [String] :base_url
|
|
62
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
63
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
64
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
65
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
66
|
+
# @option params [String] :api_key
|
|
67
|
+
# @option params [Apifreaks::Types::GeolocationLookupRequestFormat, nil] :format
|
|
68
|
+
# @option params [String, nil] :ip
|
|
69
|
+
# @option params [Apifreaks::Types::GeolocationLookupRequestLang, nil] :lang
|
|
70
|
+
# @option params [String, nil] :fields
|
|
71
|
+
# @option params [String, nil] :excludes
|
|
72
|
+
# @option params [String, nil] :include
|
|
73
|
+
#
|
|
74
|
+
# @return [Apifreaks::Types::GeolocationLookupResponse]
|
|
75
|
+
def geolocation_lookup_v2(request_options: {}, **params)
|
|
76
|
+
params = Apifreaks::Internal::Types::Utils.normalize_keys(params)
|
|
77
|
+
query_params = {}
|
|
78
|
+
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
79
|
+
query_params["format"] = params[:format] if params.key?(:format)
|
|
80
|
+
query_params["ip"] = params[:ip] if params.key?(:ip)
|
|
81
|
+
query_params["lang"] = params[:lang] if params.key?(:lang)
|
|
82
|
+
query_params["fields"] = params[:fields] if params.key?(:fields)
|
|
83
|
+
query_params["excludes"] = params[:excludes] if params.key?(:excludes)
|
|
84
|
+
query_params["include"] = params[:include] if params.key?(:include)
|
|
85
|
+
|
|
86
|
+
request = Apifreaks::Internal::JSON::Request.new(
|
|
87
|
+
base_url: request_options[:base_url],
|
|
88
|
+
method: "GET",
|
|
89
|
+
path: "v2.0/geolocation/lookup",
|
|
90
|
+
query: query_params,
|
|
91
|
+
request_options: request_options
|
|
92
|
+
)
|
|
93
|
+
begin
|
|
94
|
+
response = @raw_client.send(request)
|
|
95
|
+
rescue Net::HTTPRequestTimeout
|
|
96
|
+
raise Apifreaks::Errors::TimeoutError
|
|
97
|
+
end
|
|
98
|
+
code = response.code.to_i
|
|
99
|
+
if code.between?(200, 299)
|
|
100
|
+
Apifreaks::Types::GeolocationLookupResponse.load(response.body)
|
|
101
|
+
else
|
|
102
|
+
error_class = Apifreaks::Errors::ResponseError.subclass_for_code(code)
|
|
103
|
+
raise error_class.new(response.body, code: code)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
56
107
|
# Retrieve detailed geolocation data for multiple IP addresses in a single request.
|
|
57
108
|
# Supports up to `50,000` IP-addresses/host-names per request.
|
|
58
109
|
#
|
|
@@ -107,6 +158,60 @@ module Apifreaks
|
|
|
107
158
|
end
|
|
108
159
|
end
|
|
109
160
|
|
|
161
|
+
# Retrieve detailed geolocation data for multiple IP addresses in a single request (v2.0).
|
|
162
|
+
# Supports up to `50,000` IP-addresses/host-names per request.
|
|
163
|
+
#
|
|
164
|
+
# @param request_options [Hash]
|
|
165
|
+
# @param params [Apifreaks::Types::BulkGeolocationLookupRequest]
|
|
166
|
+
# @option request_options [String] :base_url
|
|
167
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
168
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
169
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
170
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
171
|
+
# @option params [String] :api_key
|
|
172
|
+
# @option params [Apifreaks::Types::BulkGeolocationLookupRequestFormat, nil] :format
|
|
173
|
+
# @option params [String, nil] :lang
|
|
174
|
+
# @option params [String, nil] :fields
|
|
175
|
+
# @option params [String, nil] :excludes
|
|
176
|
+
# @option params [String, nil] :include
|
|
177
|
+
#
|
|
178
|
+
# @return [Array[Apifreaks::Types::BulkGeolocationLookupResponseItem]]
|
|
179
|
+
def bulk_geolocation_lookup_v2(request_options: {}, **params)
|
|
180
|
+
params = Apifreaks::Internal::Types::Utils.normalize_keys(params)
|
|
181
|
+
request_data = Apifreaks::Types::BulkGeolocationLookupRequest.new(params).to_h
|
|
182
|
+
non_body_param_names = %w[apiKey format lang fields excludes include]
|
|
183
|
+
body = request_data.except(*non_body_param_names)
|
|
184
|
+
|
|
185
|
+
query_params = {}
|
|
186
|
+
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
187
|
+
query_params["format"] = params[:format] if params.key?(:format)
|
|
188
|
+
query_params["lang"] = params[:lang] if params.key?(:lang)
|
|
189
|
+
query_params["fields"] = params[:fields] if params.key?(:fields)
|
|
190
|
+
query_params["excludes"] = params[:excludes] if params.key?(:excludes)
|
|
191
|
+
query_params["include"] = params[:include] if params.key?(:include)
|
|
192
|
+
|
|
193
|
+
request = Apifreaks::Internal::JSON::Request.new(
|
|
194
|
+
base_url: request_options[:base_url],
|
|
195
|
+
method: "POST",
|
|
196
|
+
path: "v2.0/geolocation/lookup",
|
|
197
|
+
query: query_params,
|
|
198
|
+
body: body,
|
|
199
|
+
request_options: request_options
|
|
200
|
+
)
|
|
201
|
+
begin
|
|
202
|
+
response = @raw_client.send(request)
|
|
203
|
+
rescue Net::HTTPRequestTimeout
|
|
204
|
+
raise Apifreaks::Errors::TimeoutError
|
|
205
|
+
end
|
|
206
|
+
code = response.code.to_i
|
|
207
|
+
if code.between?(200, 299)
|
|
208
|
+
Apifreaks::Types::BulkGeolocationLookupResponseItem.load(response.body)
|
|
209
|
+
else
|
|
210
|
+
error_class = Apifreaks::Errors::ResponseError.subclass_for_code(code)
|
|
211
|
+
raise error_class.new(response.body, code: code)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
110
215
|
# Get comprehensive security information for a given IP address. Detects VPNs, proxies, Tor nodes, and other
|
|
111
216
|
# security threats.
|
|
112
217
|
#
|
|
@@ -354,6 +459,49 @@ module Apifreaks
|
|
|
354
459
|
end
|
|
355
460
|
end
|
|
356
461
|
|
|
462
|
+
# Retrieve live WHOIS information for a single domain name (v2.0), including registration
|
|
463
|
+
# dates, nameservers, and registrant information.
|
|
464
|
+
#
|
|
465
|
+
# @param request_options [Hash]
|
|
466
|
+
# @param params [Hash]
|
|
467
|
+
# @option request_options [String] :base_url
|
|
468
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
469
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
470
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
471
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
472
|
+
# @option params [String] :api_key
|
|
473
|
+
# @option params [Apifreaks::Types::DomainWhoisLookupRequestFormat, nil] :format
|
|
474
|
+
# @option params [String] :domain_name
|
|
475
|
+
#
|
|
476
|
+
# @return [Apifreaks::Types::DomainWhoisLookupResponse]
|
|
477
|
+
def domain_whois_lookup_v2(request_options: {}, **params)
|
|
478
|
+
params = Apifreaks::Internal::Types::Utils.normalize_keys(params)
|
|
479
|
+
query_params = {}
|
|
480
|
+
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
481
|
+
query_params["format"] = params[:format] if params.key?(:format)
|
|
482
|
+
query_params["domainName"] = params[:domain_name] if params.key?(:domain_name)
|
|
483
|
+
|
|
484
|
+
request = Apifreaks::Internal::JSON::Request.new(
|
|
485
|
+
base_url: request_options[:base_url],
|
|
486
|
+
method: "GET",
|
|
487
|
+
path: "v2.0/domain/whois/live",
|
|
488
|
+
query: query_params,
|
|
489
|
+
request_options: request_options
|
|
490
|
+
)
|
|
491
|
+
begin
|
|
492
|
+
response = @raw_client.send(request)
|
|
493
|
+
rescue Net::HTTPRequestTimeout
|
|
494
|
+
raise Apifreaks::Errors::TimeoutError
|
|
495
|
+
end
|
|
496
|
+
code = response.code.to_i
|
|
497
|
+
if code.between?(200, 299)
|
|
498
|
+
Apifreaks::Types::DomainWhoisLookupResponse.load(response.body)
|
|
499
|
+
else
|
|
500
|
+
error_class = Apifreaks::Errors::ResponseError.subclass_for_code(code)
|
|
501
|
+
raise error_class.new(response.body, code: code)
|
|
502
|
+
end
|
|
503
|
+
end
|
|
504
|
+
|
|
357
505
|
# Retrieve WHOIS information for `100 Domains per Request`.
|
|
358
506
|
#
|
|
359
507
|
# @param request_options [Hash]
|
|
@@ -399,6 +547,51 @@ module Apifreaks
|
|
|
399
547
|
end
|
|
400
548
|
end
|
|
401
549
|
|
|
550
|
+
# Retrieve WHOIS information for `100 Domains per Request` (v2.0).
|
|
551
|
+
#
|
|
552
|
+
# @param request_options [Hash]
|
|
553
|
+
# @param params [Apifreaks::Types::BulkDomainWhoisLookupRequest]
|
|
554
|
+
# @option request_options [String] :base_url
|
|
555
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
556
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
557
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
558
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
559
|
+
# @option params [String] :api_key
|
|
560
|
+
# @option params [Apifreaks::Types::BulkDomainWhoisLookupRequestFormat, nil] :format
|
|
561
|
+
#
|
|
562
|
+
# @return [Apifreaks::Types::BulkDomainWhoisLookupResponse]
|
|
563
|
+
def bulk_domain_whois_lookup_v2(request_options: {}, **params)
|
|
564
|
+
params = Apifreaks::Internal::Types::Utils.normalize_keys(params)
|
|
565
|
+
request_data = Apifreaks::Types::BulkDomainWhoisLookupRequest.new(params).to_h
|
|
566
|
+
non_body_param_names = %w[apiKey format]
|
|
567
|
+
body = request_data.except(*non_body_param_names)
|
|
568
|
+
|
|
569
|
+
query_params = {}
|
|
570
|
+
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
571
|
+
query_params["format"] = params[:format] if params.key?(:format)
|
|
572
|
+
|
|
573
|
+
request = Apifreaks::Internal::JSON::Request.new(
|
|
574
|
+
base_url: request_options[:base_url],
|
|
575
|
+
method: "POST",
|
|
576
|
+
path: "v2.0/domain/whois/live",
|
|
577
|
+
query: query_params,
|
|
578
|
+
body: body,
|
|
579
|
+
request_options: request_options
|
|
580
|
+
)
|
|
581
|
+
begin
|
|
582
|
+
response = @raw_client.send(request)
|
|
583
|
+
rescue Net::HTTPRequestTimeout
|
|
584
|
+
raise Apifreaks::Errors::TimeoutError
|
|
585
|
+
end
|
|
586
|
+
code = response.code.to_i
|
|
587
|
+
if code.between?(200, 299)
|
|
588
|
+
Apifreaks::Types::BulkDomainWhoisLookupResponse.load(response.body)
|
|
589
|
+
else
|
|
590
|
+
error_class = Apifreaks::Errors::ResponseError.subclass_for_code(code)
|
|
591
|
+
raise error_class.new(response.body, code: code)
|
|
592
|
+
end
|
|
593
|
+
end
|
|
594
|
+
|
|
402
595
|
# Returns WHOIS registration details for a specified IP address (IPv4 or IPv6).
|
|
403
596
|
#
|
|
404
597
|
# @param request_options [Hash]
|
|
@@ -594,7 +787,7 @@ module Apifreaks
|
|
|
594
787
|
# @option params [Apifreaks::Types::DomainDNSLookupRequestFormat, nil] :format
|
|
595
788
|
# @option params [String, nil] :host_name
|
|
596
789
|
# @option params [String, nil] :ip_address
|
|
597
|
-
# @option params [String
|
|
790
|
+
# @option params [String] :type
|
|
598
791
|
#
|
|
599
792
|
# @return [Apifreaks::Types::DomainDNSLookupResponse]
|
|
600
793
|
def domain_dns_lookup(request_options: {}, **params)
|
|
@@ -639,7 +832,8 @@ module Apifreaks
|
|
|
639
832
|
# @option request_options [Integer] :timeout_in_seconds
|
|
640
833
|
# @option params [String] :api_key
|
|
641
834
|
# @option params [Apifreaks::Types::BulkDomainDNSLookupRequestFormat, nil] :format
|
|
642
|
-
# @option params [String
|
|
835
|
+
# @option params [String] :type
|
|
836
|
+
# @option params [Internal::Types::Array[String], nil] :ip_addresses
|
|
643
837
|
#
|
|
644
838
|
# @return [Apifreaks::Types::BulkDomainDNSLookupResponse]
|
|
645
839
|
def bulk_domain_dns_lookup(request_options: {}, **params)
|
|
@@ -689,7 +883,7 @@ module Apifreaks
|
|
|
689
883
|
# @option params [String] :api_key
|
|
690
884
|
# @option params [Apifreaks::Types::DomainDNSHistoryRequestFormat, nil] :format
|
|
691
885
|
# @option params [String] :host_name
|
|
692
|
-
# @option params [String
|
|
886
|
+
# @option params [String] :type
|
|
693
887
|
# @option params [Integer, nil] :page
|
|
694
888
|
#
|
|
695
889
|
# @return [Apifreaks::Types::DomainDNSHistoryResponse]
|
|
@@ -1213,6 +1407,7 @@ module Apifreaks
|
|
|
1213
1407
|
# @option params [String] :domain
|
|
1214
1408
|
# @option params [Apifreaks::Types::DomainAvailabilitySuggestionsRequestSource, nil] :source
|
|
1215
1409
|
# @option params [Integer, nil] :count
|
|
1410
|
+
# @option params [Boolean, nil] :sug
|
|
1216
1411
|
#
|
|
1217
1412
|
# @return [Apifreaks::Types::DomainAvailabilitySuggestionsResponse]
|
|
1218
1413
|
def domain_availability_suggestions(request_options: {}, **params)
|
|
@@ -1223,6 +1418,7 @@ module Apifreaks
|
|
|
1223
1418
|
query_params["domain"] = params[:domain] if params.key?(:domain)
|
|
1224
1419
|
query_params["source"] = params[:source] if params.key?(:source)
|
|
1225
1420
|
query_params["count"] = params[:count] if params.key?(:count)
|
|
1421
|
+
query_params["sug"] = params[:sug] if params.key?(:sug)
|
|
1226
1422
|
|
|
1227
1423
|
request = Apifreaks::Internal::JSON::Request.new(
|
|
1228
1424
|
base_url: request_options[:base_url],
|
|
@@ -2086,6 +2282,7 @@ module Apifreaks
|
|
|
2086
2282
|
# @option request_options [Integer] :timeout_in_seconds
|
|
2087
2283
|
# @option params [String] :api_key
|
|
2088
2284
|
# @option params [Apifreaks::Types::PdfUploadResourcesRequestFormat, nil] :format
|
|
2285
|
+
# @option params [File] :file
|
|
2089
2286
|
#
|
|
2090
2287
|
# @return [Apifreaks::Types::PdfUploadResourcesResponse]
|
|
2091
2288
|
def pdf_upload_resources(request_options: {}, **params)
|
|
@@ -2702,7 +2899,7 @@ module Apifreaks
|
|
|
2702
2899
|
# @option params [Apifreaks::Types::CurrencyConvertLatestRequestFormat, nil] :format
|
|
2703
2900
|
# @option params [String] :from
|
|
2704
2901
|
# @option params [String] :to
|
|
2705
|
-
# @option params [
|
|
2902
|
+
# @option params [String, nil] :amount
|
|
2706
2903
|
# @option params [Apifreaks::Types::CurrencyConvertLatestRequestUpdates, nil] :updates
|
|
2707
2904
|
#
|
|
2708
2905
|
# @return [Apifreaks::Types::CurrencyConvertLatestResponse]
|
|
@@ -2750,7 +2947,7 @@ module Apifreaks
|
|
|
2750
2947
|
# @option params [Apifreaks::Types::CurrencyConvertHistoricalRequestFormat, nil] :format
|
|
2751
2948
|
# @option params [String] :from
|
|
2752
2949
|
# @option params [String] :to
|
|
2753
|
-
# @option params [
|
|
2950
|
+
# @option params [String, nil] :amount
|
|
2754
2951
|
# @option params [String] :date
|
|
2755
2952
|
#
|
|
2756
2953
|
# @return [Apifreaks::Types::CurrencyConvertHistoricalResponse]
|
|
@@ -2895,7 +3092,7 @@ module Apifreaks
|
|
|
2895
3092
|
# @option params [Apifreaks::Types::CurrencyConvertByIPRequestUpdates, nil] :updates
|
|
2896
3093
|
# @option params [String] :from
|
|
2897
3094
|
# @option params [String, nil] :ip
|
|
2898
|
-
# @option params [
|
|
3095
|
+
# @option params [String, nil] :amount
|
|
2899
3096
|
#
|
|
2900
3097
|
# @return [Apifreaks::Types::CurrencyConvertByIPResponse]
|
|
2901
3098
|
def currency_convert_by_ip(request_options: {}, **params)
|
|
@@ -3060,7 +3257,7 @@ module Apifreaks
|
|
|
3060
3257
|
# @option request_options [Integer] :timeout_in_seconds
|
|
3061
3258
|
# @option params [String] :api_key
|
|
3062
3259
|
# @option params [Apifreaks::Types::CommodityLatestRatesRequestFormat, nil] :format
|
|
3063
|
-
# @option params [String
|
|
3260
|
+
# @option params [String] :symbols
|
|
3064
3261
|
# @option params [Apifreaks::Types::CommodityLatestRatesRequestUpdates] :updates
|
|
3065
3262
|
# @option params [String, nil] :quote
|
|
3066
3263
|
#
|
|
@@ -3107,7 +3304,7 @@ module Apifreaks
|
|
|
3107
3304
|
# @option params [String] :api_key
|
|
3108
3305
|
# @option params [Apifreaks::Types::CommodityHistoricalRatesRequestFormat, nil] :format
|
|
3109
3306
|
# @option params [String] :date
|
|
3110
|
-
# @option params [String
|
|
3307
|
+
# @option params [String] :symbols
|
|
3111
3308
|
#
|
|
3112
3309
|
# @return [Apifreaks::Types::CommodityHistoricalRatesResponse]
|
|
3113
3310
|
def commodity_historical_rates(request_options: {}, **params)
|
|
@@ -3150,7 +3347,7 @@ module Apifreaks
|
|
|
3150
3347
|
# @option request_options [Integer] :timeout_in_seconds
|
|
3151
3348
|
# @option params [String] :api_key
|
|
3152
3349
|
# @option params [Apifreaks::Types::CommodityFluctuationRequestFormat, nil] :format
|
|
3153
|
-
# @option params [String
|
|
3350
|
+
# @option params [String] :symbols
|
|
3154
3351
|
# @option params [String] :start_date
|
|
3155
3352
|
# @option params [String] :end_date
|
|
3156
3353
|
#
|
|
@@ -3196,7 +3393,7 @@ module Apifreaks
|
|
|
3196
3393
|
# @option request_options [Integer] :timeout_in_seconds
|
|
3197
3394
|
# @option params [String] :api_key
|
|
3198
3395
|
# @option params [Apifreaks::Types::CommodityTimeSeriesRequestFormat, nil] :format
|
|
3199
|
-
# @option params [String
|
|
3396
|
+
# @option params [String] :symbols
|
|
3200
3397
|
# @option params [String] :start_date
|
|
3201
3398
|
# @option params [String] :end_date
|
|
3202
3399
|
#
|
|
@@ -4867,6 +5064,65 @@ module Apifreaks
|
|
|
4867
5064
|
end
|
|
4868
5065
|
end
|
|
4869
5066
|
|
|
5067
|
+
# Retrieve current time, date, and timezone-related information (v2.0) by specifying a timezone name, location
|
|
5068
|
+
# address, location coordinates, IP address, or use the client IP address if no parameter is passed.
|
|
5069
|
+
#
|
|
5070
|
+
# @param request_options [Hash]
|
|
5071
|
+
# @param params [Hash]
|
|
5072
|
+
# @option request_options [String] :base_url
|
|
5073
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
5074
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
5075
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
5076
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
5077
|
+
# @option params [String] :api_key
|
|
5078
|
+
# @option params [Apifreaks::Types::TimezoneLookupRequestFormat, nil] :format
|
|
5079
|
+
# @option params [String, nil] :ip
|
|
5080
|
+
# @option params [String, nil] :tz
|
|
5081
|
+
# @option params [String, nil] :location
|
|
5082
|
+
# @option params [Integer, nil] :lat
|
|
5083
|
+
# @option params [Integer, nil] :long
|
|
5084
|
+
# @option params [Apifreaks::Types::TimezoneLookupRequestLang, nil] :lang
|
|
5085
|
+
# @option params [String, nil] :iata_code
|
|
5086
|
+
# @option params [String, nil] :icao_code
|
|
5087
|
+
# @option params [String, nil] :lo_code
|
|
5088
|
+
#
|
|
5089
|
+
# @return [Apifreaks::Types::TimezoneLookupResponse]
|
|
5090
|
+
def timezone_lookup_v2(request_options: {}, **params)
|
|
5091
|
+
params = Apifreaks::Internal::Types::Utils.normalize_keys(params)
|
|
5092
|
+
query_params = {}
|
|
5093
|
+
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
5094
|
+
query_params["format"] = params[:format] if params.key?(:format)
|
|
5095
|
+
query_params["ip"] = params[:ip] if params.key?(:ip)
|
|
5096
|
+
query_params["tz"] = params[:tz] if params.key?(:tz)
|
|
5097
|
+
query_params["location"] = params[:location] if params.key?(:location)
|
|
5098
|
+
query_params["lat"] = params[:lat] if params.key?(:lat)
|
|
5099
|
+
query_params["long"] = params[:long] if params.key?(:long)
|
|
5100
|
+
query_params["lang"] = params[:lang] if params.key?(:lang)
|
|
5101
|
+
query_params["iata_code"] = params[:iata_code] if params.key?(:iata_code)
|
|
5102
|
+
query_params["icao_code"] = params[:icao_code] if params.key?(:icao_code)
|
|
5103
|
+
query_params["lo_code"] = params[:lo_code] if params.key?(:lo_code)
|
|
5104
|
+
|
|
5105
|
+
request = Apifreaks::Internal::JSON::Request.new(
|
|
5106
|
+
base_url: request_options[:base_url],
|
|
5107
|
+
method: "GET",
|
|
5108
|
+
path: "v2.0/geolocation/timezone",
|
|
5109
|
+
query: query_params,
|
|
5110
|
+
request_options: request_options
|
|
5111
|
+
)
|
|
5112
|
+
begin
|
|
5113
|
+
response = @raw_client.send(request)
|
|
5114
|
+
rescue Net::HTTPRequestTimeout
|
|
5115
|
+
raise Apifreaks::Errors::TimeoutError
|
|
5116
|
+
end
|
|
5117
|
+
code = response.code.to_i
|
|
5118
|
+
if code.between?(200, 299)
|
|
5119
|
+
Apifreaks::Types::TimezoneLookupResponse.load(response.body)
|
|
5120
|
+
else
|
|
5121
|
+
error_class = Apifreaks::Errors::ResponseError.subclass_for_code(code)
|
|
5122
|
+
raise error_class.new(response.body, code: code)
|
|
5123
|
+
end
|
|
5124
|
+
end
|
|
5125
|
+
|
|
4870
5126
|
# Converts a given time from one timezone to another using various input types like timezone name, coordinates,
|
|
4871
5127
|
# location, or codes.
|
|
4872
5128
|
#
|
|
@@ -4949,6 +5205,7 @@ module Apifreaks
|
|
|
4949
5205
|
# @option request_options [Integer] :timeout_in_seconds
|
|
4950
5206
|
# @option params [String] :api_key
|
|
4951
5207
|
# @option params [Apifreaks::Types::UserAgentLookupRequestFormat, nil] :format
|
|
5208
|
+
# @option params [String] :user_agent
|
|
4952
5209
|
#
|
|
4953
5210
|
# @return [Apifreaks::Types::UserAgentLookupResponse]
|
|
4954
5211
|
def user_agent_lookup(request_options: {}, **params)
|
|
@@ -4957,10 +5214,14 @@ module Apifreaks
|
|
|
4957
5214
|
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
4958
5215
|
query_params["format"] = params[:format] if params.key?(:format)
|
|
4959
5216
|
|
|
5217
|
+
headers = {}
|
|
5218
|
+
headers["User-Agent"] = params[:user_agent] if params[:user_agent]
|
|
5219
|
+
|
|
4960
5220
|
request = Apifreaks::Internal::JSON::Request.new(
|
|
4961
5221
|
base_url: request_options[:base_url],
|
|
4962
5222
|
method: "GET",
|
|
4963
5223
|
path: "v1.0/user-agent/lookup",
|
|
5224
|
+
headers: headers,
|
|
4964
5225
|
query: query_params,
|
|
4965
5226
|
request_options: request_options
|
|
4966
5227
|
)
|
|
@@ -5324,6 +5585,64 @@ module Apifreaks
|
|
|
5324
5585
|
end
|
|
5325
5586
|
end
|
|
5326
5587
|
|
|
5588
|
+
# Retrieve sunrise and sunset times, current position of the moon, and other related information (v2.0) by
|
|
5589
|
+
# specifying a location address, location coordinates, IP address, or using the client IP address if no parameter
|
|
5590
|
+
# is passed.
|
|
5591
|
+
#
|
|
5592
|
+
# @param request_options [Hash]
|
|
5593
|
+
# @param params [Hash]
|
|
5594
|
+
# @option request_options [String] :base_url
|
|
5595
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
5596
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
5597
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
5598
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
5599
|
+
# @option params [String] :api_key
|
|
5600
|
+
# @option params [Apifreaks::Types::AstronomyLookupRequestFormat, nil] :format
|
|
5601
|
+
# @option params [String, nil] :location
|
|
5602
|
+
# @option params [Integer, nil] :lat
|
|
5603
|
+
# @option params [Integer, nil] :long
|
|
5604
|
+
# @option params [String, nil] :ip
|
|
5605
|
+
# @option params [String, nil] :lang
|
|
5606
|
+
# @option params [String, nil] :date
|
|
5607
|
+
# @option params [Integer, nil] :elevation
|
|
5608
|
+
# @option params [String, nil] :time_zone
|
|
5609
|
+
#
|
|
5610
|
+
# @return [Apifreaks::Types::AstronomyLookupResponse]
|
|
5611
|
+
def astronomy_lookup_v2(request_options: {}, **params)
|
|
5612
|
+
params = Apifreaks::Internal::Types::Utils.normalize_keys(params)
|
|
5613
|
+
query_params = {}
|
|
5614
|
+
query_params["apiKey"] = params[:api_key] if params.key?(:api_key)
|
|
5615
|
+
query_params["format"] = params[:format] if params.key?(:format)
|
|
5616
|
+
query_params["location"] = params[:location] if params.key?(:location)
|
|
5617
|
+
query_params["lat"] = params[:lat] if params.key?(:lat)
|
|
5618
|
+
query_params["long"] = params[:long] if params.key?(:long)
|
|
5619
|
+
query_params["ip"] = params[:ip] if params.key?(:ip)
|
|
5620
|
+
query_params["lang"] = params[:lang] if params.key?(:lang)
|
|
5621
|
+
query_params["date"] = params[:date] if params.key?(:date)
|
|
5622
|
+
query_params["elevation"] = params[:elevation] if params.key?(:elevation)
|
|
5623
|
+
query_params["time_zone"] = params[:time_zone] if params.key?(:time_zone)
|
|
5624
|
+
|
|
5625
|
+
request = Apifreaks::Internal::JSON::Request.new(
|
|
5626
|
+
base_url: request_options[:base_url],
|
|
5627
|
+
method: "GET",
|
|
5628
|
+
path: "v2.0/geolocation/astronomy",
|
|
5629
|
+
query: query_params,
|
|
5630
|
+
request_options: request_options
|
|
5631
|
+
)
|
|
5632
|
+
begin
|
|
5633
|
+
response = @raw_client.send(request)
|
|
5634
|
+
rescue Net::HTTPRequestTimeout
|
|
5635
|
+
raise Apifreaks::Errors::TimeoutError
|
|
5636
|
+
end
|
|
5637
|
+
code = response.code.to_i
|
|
5638
|
+
if code.between?(200, 299)
|
|
5639
|
+
Apifreaks::Types::AstronomyLookupResponse.load(response.body)
|
|
5640
|
+
else
|
|
5641
|
+
error_class = Apifreaks::Errors::ResponseError.subclass_for_code(code)
|
|
5642
|
+
raise error_class.new(response.body, code: code)
|
|
5643
|
+
end
|
|
5644
|
+
end
|
|
5645
|
+
|
|
5327
5646
|
# @param base_url [String, nil]
|
|
5328
5647
|
# @param max_retries [Integer]
|
|
5329
5648
|
#
|
|
@@ -5,7 +5,7 @@ module Apifreaks
|
|
|
5
5
|
class AstronomyLookupResponse < Internal::Types::Model
|
|
6
6
|
field :ip, -> { String }, optional: true, nullable: false
|
|
7
7
|
|
|
8
|
-
field :location, -> { Apifreaks::Types::AstronomyLookupResponseLocation }, optional:
|
|
8
|
+
field :location, -> { Apifreaks::Types::AstronomyLookupResponseLocation }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :astronomy, -> { Apifreaks::Types::AstronomyLookupResponseAstronomy }, optional: false, nullable: false
|
|
11
11
|
end
|
|
@@ -13,29 +13,29 @@ module Apifreaks
|
|
|
13
13
|
|
|
14
14
|
field :country_code3, -> { String }, optional: true, nullable: false
|
|
15
15
|
|
|
16
|
-
field :country_name, -> { String }, optional:
|
|
16
|
+
field :country_name, -> { String }, optional: true, nullable: false
|
|
17
17
|
|
|
18
18
|
field :country_name_official, -> { String }, optional: true, nullable: false
|
|
19
19
|
|
|
20
20
|
field :is_eu, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
21
21
|
|
|
22
|
-
field :state_prov, -> { String }, optional:
|
|
22
|
+
field :state_prov, -> { String }, optional: true, nullable: false
|
|
23
23
|
|
|
24
24
|
field :state_code, -> { String }, optional: true, nullable: false
|
|
25
25
|
|
|
26
26
|
field :district, -> { String }, optional: true, nullable: false
|
|
27
27
|
|
|
28
|
-
field :city, -> { String }, optional:
|
|
28
|
+
field :city, -> { String }, optional: true, nullable: false
|
|
29
29
|
|
|
30
30
|
field :zipcode, -> { String }, optional: true, nullable: false
|
|
31
31
|
|
|
32
|
-
field :latitude, -> { String }, optional:
|
|
32
|
+
field :latitude, -> { String }, optional: true, nullable: false
|
|
33
33
|
|
|
34
|
-
field :longitude, -> { String }, optional:
|
|
34
|
+
field :longitude, -> { String }, optional: true, nullable: false
|
|
35
35
|
|
|
36
|
-
field :locality, -> { String }, optional:
|
|
36
|
+
field :locality, -> { String }, optional: true, nullable: false
|
|
37
37
|
|
|
38
|
-
field :elevation, -> { String }, optional:
|
|
38
|
+
field :elevation, -> { String }, optional: true, nullable: false
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Apifreaks
|
|
4
4
|
module Types
|
|
5
5
|
class BulkDomainAvailabilityCheckResponse < Internal::Types::Model
|
|
6
|
-
field :bulk_domain_available_response, -> { Internal::Types::Array[Apifreaks::Types::BulkDomainAvailabilityCheckResponseBulkDomainAvailableResponseItem] }, optional:
|
|
6
|
+
field :bulk_domain_available_response, -> { Internal::Types::Array[Apifreaks::Types::BulkDomainAvailabilityCheckResponseBulkDomainAvailableResponseItem] }, optional: false, nullable: false
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
end
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
module Apifreaks
|
|
4
4
|
module Types
|
|
5
5
|
class BulkDomainAvailabilityCheckResponseBulkDomainAvailableResponseItem < Internal::Types::Model
|
|
6
|
-
field :domain, -> { String }, optional:
|
|
6
|
+
field :domain, -> { String }, optional: false, nullable: false
|
|
7
7
|
|
|
8
|
-
field :domain_availability, -> { Internal::Types::Boolean }, optional:
|
|
8
|
+
field :domain_availability, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "domainAvailability"
|
|
9
9
|
|
|
10
|
-
field :status, -> { Internal::Types::Boolean }, optional:
|
|
10
|
+
field :status, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -7,9 +7,11 @@ module Apifreaks
|
|
|
7
7
|
|
|
8
8
|
field :format, -> { Apifreaks::Types::BulkDomainDNSLookupRequestFormat }, optional: true, nullable: false
|
|
9
9
|
|
|
10
|
-
field :type, -> { String }, optional:
|
|
10
|
+
field :type, -> { String }, optional: false, nullable: false
|
|
11
11
|
|
|
12
12
|
field :domain_names, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "domainNames"
|
|
13
|
+
|
|
14
|
+
field :ip_addresses, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "ipAddresses"
|
|
13
15
|
end
|
|
14
16
|
end
|
|
15
17
|
end
|
|
@@ -7,9 +7,11 @@ module Apifreaks
|
|
|
7
7
|
|
|
8
8
|
field :query_time, -> { String }, optional: false, nullable: false, api_name: "queryTime"
|
|
9
9
|
|
|
10
|
-
field :domain_name, -> { String }, optional:
|
|
10
|
+
field :domain_name, -> { String }, optional: true, nullable: false, api_name: "domainName"
|
|
11
11
|
|
|
12
|
-
field :domain_registered, -> { Internal::Types::Boolean }, optional:
|
|
12
|
+
field :domain_registered, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "domainRegistered"
|
|
13
|
+
|
|
14
|
+
field :ip_address, -> { String }, optional: true, nullable: false, api_name: "ipAddress"
|
|
13
15
|
|
|
14
16
|
field :dns_types, -> { Apifreaks::Types::BulkDomainDNSLookupResponseBulkDNSInfoItemDNSTypes }, optional: false, nullable: false, api_name: "dnsTypes"
|
|
15
17
|
|
|
@@ -18,6 +18,8 @@ module Apifreaks
|
|
|
18
18
|
field :txt, -> { Integer }, optional: true, nullable: false, api_name: "TXT"
|
|
19
19
|
|
|
20
20
|
field :spf, -> { Integer }, optional: true, nullable: false, api_name: "SPF"
|
|
21
|
+
|
|
22
|
+
field :ptr, -> { Integer }, optional: true, nullable: false, api_name: "PTR"
|
|
21
23
|
end
|
|
22
24
|
end
|
|
23
25
|
end
|
|
@@ -21,7 +21,7 @@ module Apifreaks
|
|
|
21
21
|
|
|
22
22
|
field :dns, -> { Apifreaks::Types::BulkEmailValidateResponseEmailValidationResponsesItemDNS }, optional: false, nullable: false
|
|
23
23
|
|
|
24
|
-
field :
|
|
24
|
+
field :ip_address, -> { String }, optional: true, nullable: false, api_name: "ipAddress"
|
|
25
25
|
|
|
26
26
|
field :address, -> { Apifreaks::Types::BulkEmailValidateResponseEmailValidationResponsesItemAddress }, optional: true, nullable: false
|
|
27
27
|
end
|
data/lib/apifreaks/types/bulk_email_validate_response_email_validation_responses_item_dns.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Apifreaks
|
|
|
5
5
|
class BulkEmailValidateResponseEmailValidationResponsesItemDNS < Internal::Types::Model
|
|
6
6
|
field :mx_records, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "mxRecords"
|
|
7
7
|
|
|
8
|
-
field :a_records, -> { Internal::Types::Array[String] }, optional:
|
|
8
|
+
field :a_records, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "aRecords"
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
end
|
|
@@ -17,7 +17,7 @@ module Apifreaks
|
|
|
17
17
|
|
|
18
18
|
field :security, -> { Apifreaks::Types::BulkGeolocationLookupResponseItemSecurity }, optional: true, nullable: false
|
|
19
19
|
|
|
20
|
-
field :abuse, -> {
|
|
20
|
+
field :abuse, -> { Apifreaks::Types::BulkGeolocationLookupResponseItemAbuseItem }, optional: true, nullable: false
|
|
21
21
|
|
|
22
22
|
field :time_zone, -> { Apifreaks::Types::BulkGeolocationLookupResponseItemTimeZone }, optional: true, nullable: false
|
|
23
23
|
|
|
@@ -9,8 +9,6 @@ module Apifreaks
|
|
|
9
9
|
|
|
10
10
|
field :region, -> { String }, optional: true, nullable: false
|
|
11
11
|
|
|
12
|
-
field :region_code, -> { String }, optional: true, nullable: false
|
|
13
|
-
|
|
14
12
|
field :city, -> { String }, optional: true, nullable: false
|
|
15
13
|
|
|
16
14
|
field :locality, -> { String }, optional: true, nullable: false
|