ipgeolocation_sdk 1.0.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 (218) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +2124 -0
  5. data/Rakefile +10 -0
  6. data/docs/ASNConnection.md +22 -0
  7. data/docs/ASNDetails.md +48 -0
  8. data/docs/ASNLookupApi.md +89 -0
  9. data/docs/ASNResponse.md +20 -0
  10. data/docs/ASNResponseXML.md +20 -0
  11. data/docs/ASNResponseXMLAsn.md +48 -0
  12. data/docs/Abuse.md +40 -0
  13. data/docs/AbuseContactApi.md +85 -0
  14. data/docs/AbuseResponse.md +20 -0
  15. data/docs/AbuseResponseXML.md +20 -0
  16. data/docs/Astronomy.md +68 -0
  17. data/docs/AstronomyApi.md +97 -0
  18. data/docs/AstronomyEvening.md +36 -0
  19. data/docs/AstronomyLocation.md +50 -0
  20. data/docs/AstronomyMorning.md +36 -0
  21. data/docs/AstronomyResponse.md +22 -0
  22. data/docs/AstronomyXMLResponse.md +22 -0
  23. data/docs/BulkIPGeolocation.md +42 -0
  24. data/docs/BulkIPSecurity.md +42 -0
  25. data/docs/CountryMetadata.md +22 -0
  26. data/docs/Currency.md +22 -0
  27. data/docs/ErrorResponse.md +18 -0
  28. data/docs/ErrorXMLResponse.md +18 -0
  29. data/docs/ErrorXMLResponseArray.md +18 -0
  30. data/docs/GeolocationResponse.md +38 -0
  31. data/docs/GeolocationXMLResponse.md +38 -0
  32. data/docs/GeolocationXMLResponseArray.md +38 -0
  33. data/docs/GetBulkIpGeolocation200ResponseInner1.md +49 -0
  34. data/docs/GetBulkIpGeolocationRequest.md +18 -0
  35. data/docs/GetBulkIpSecurityInfo200ResponseInner1.md +49 -0
  36. data/docs/IPLocationApi.md +175 -0
  37. data/docs/Location.md +58 -0
  38. data/docs/LocationMinimal.md +52 -0
  39. data/docs/Network.md +22 -0
  40. data/docs/NetworkAsn.md +38 -0
  41. data/docs/NetworkCompany.md +22 -0
  42. data/docs/NetworkMinimal.md +20 -0
  43. data/docs/NetworkMinimalAsn.md +22 -0
  44. data/docs/NetworkMinimalCompany.md +18 -0
  45. data/docs/ParseBulkUserAgentStringsRequest.md +18 -0
  46. data/docs/ParseUserAgentStringRequest.md +18 -0
  47. data/docs/Security.md +38 -0
  48. data/docs/SecurityAPIResponse.md +34 -0
  49. data/docs/SecurityAPIXMLResponse.md +34 -0
  50. data/docs/SecurityAPIXMLResponseArray.md +34 -0
  51. data/docs/SecurityApi.md +175 -0
  52. data/docs/TimeConversionApi.md +109 -0
  53. data/docs/TimeConversionResponse.md +24 -0
  54. data/docs/TimeConversionXMLResponse.md +24 -0
  55. data/docs/TimeZone.md +36 -0
  56. data/docs/TimeZoneDetailedResponse.md +26 -0
  57. data/docs/TimeZoneDetailedXMLResponse.md +26 -0
  58. data/docs/TimeZoneDstEnd.md +28 -0
  59. data/docs/TimeZoneDstStart.md +28 -0
  60. data/docs/TimezoneAirport.md +40 -0
  61. data/docs/TimezoneApi.md +99 -0
  62. data/docs/TimezoneDetail.md +56 -0
  63. data/docs/TimezoneDetailDstEnd.md +28 -0
  64. data/docs/TimezoneDetailDstStart.md +28 -0
  65. data/docs/TimezoneLocation.md +48 -0
  66. data/docs/TimezoneLocode.md +32 -0
  67. data/docs/UserAgentApi.md +235 -0
  68. data/docs/UserAgentData.md +32 -0
  69. data/docs/UserAgentDataDevice.md +24 -0
  70. data/docs/UserAgentDataEngine.md +24 -0
  71. data/docs/UserAgentDataOperatingSystem.md +26 -0
  72. data/docs/UserAgentXMLData.md +32 -0
  73. data/docs/UserAgentXMLDataArray.md +32 -0
  74. data/git_push.sh +57 -0
  75. data/ipgeolocation_sdk.gemspec +29 -0
  76. data/lib/ipgeolocation_sdk/api/abuse_contact_api.rb +86 -0
  77. data/lib/ipgeolocation_sdk/api/asn_lookup_api.rb +92 -0
  78. data/lib/ipgeolocation_sdk/api/astronomy_api.rb +116 -0
  79. data/lib/ipgeolocation_sdk/api/ip_geolocation_api.rb +186 -0
  80. data/lib/ipgeolocation_sdk/api/ip_security_api.rb +184 -0
  81. data/lib/ipgeolocation_sdk/api/time_conversion_api.rb +122 -0
  82. data/lib/ipgeolocation_sdk/api/timezone_api.rb +113 -0
  83. data/lib/ipgeolocation_sdk/api/user_agent_api.rb +158 -0
  84. data/lib/ipgeolocation_sdk/api_client.rb +393 -0
  85. data/lib/ipgeolocation_sdk/api_error.rb +58 -0
  86. data/lib/ipgeolocation_sdk/configuration.rb +308 -0
  87. data/lib/ipgeolocation_sdk/models/abuse.rb +305 -0
  88. data/lib/ipgeolocation_sdk/models/abuse_response.rb +229 -0
  89. data/lib/ipgeolocation_sdk/models/abuse_response_xml.rb +229 -0
  90. data/lib/ipgeolocation_sdk/models/asn_connection.rb +238 -0
  91. data/lib/ipgeolocation_sdk/models/asn_response.rb +230 -0
  92. data/lib/ipgeolocation_sdk/models/asn_response_asn.rb +368 -0
  93. data/lib/ipgeolocation_sdk/models/asn_response_xml.rb +229 -0
  94. data/lib/ipgeolocation_sdk/models/asn_response_xml_asn.rb +364 -0
  95. data/lib/ipgeolocation_sdk/models/astronomy.rb +445 -0
  96. data/lib/ipgeolocation_sdk/models/astronomy_evening.rb +301 -0
  97. data/lib/ipgeolocation_sdk/models/astronomy_location.rb +364 -0
  98. data/lib/ipgeolocation_sdk/models/astronomy_morning.rb +301 -0
  99. data/lib/ipgeolocation_sdk/models/astronomy_response.rb +238 -0
  100. data/lib/ipgeolocation_sdk/models/astronomy_xml_response.rb +238 -0
  101. data/lib/ipgeolocation_sdk/models/bulk_ip_geolocation.rb +113 -0
  102. data/lib/ipgeolocation_sdk/models/bulk_ip_security.rb +113 -0
  103. data/lib/ipgeolocation_sdk/models/country_metadata.rb +240 -0
  104. data/lib/ipgeolocation_sdk/models/currency.rb +238 -0
  105. data/lib/ipgeolocation_sdk/models/error_response.rb +220 -0
  106. data/lib/ipgeolocation_sdk/models/error_xml_response.rb +220 -0
  107. data/lib/ipgeolocation_sdk/models/error_xml_response_array.rb +220 -0
  108. data/lib/ipgeolocation_sdk/models/geolocation_response.rb +310 -0
  109. data/lib/ipgeolocation_sdk/models/geolocation_xml_response.rb +310 -0
  110. data/lib/ipgeolocation_sdk/models/geolocation_xml_response_array.rb +310 -0
  111. data/lib/ipgeolocation_sdk/models/get_bulk_ip_geolocation200_response_inner1.rb +105 -0
  112. data/lib/ipgeolocation_sdk/models/get_bulk_ip_geolocation_request.rb +241 -0
  113. data/lib/ipgeolocation_sdk/models/get_bulk_ip_security_info200_response_inner1.rb +105 -0
  114. data/lib/ipgeolocation_sdk/models/location.rb +400 -0
  115. data/lib/ipgeolocation_sdk/models/location_minimal.rb +373 -0
  116. data/lib/ipgeolocation_sdk/models/network.rb +238 -0
  117. data/lib/ipgeolocation_sdk/models/network_asn.rb +310 -0
  118. data/lib/ipgeolocation_sdk/models/network_company.rb +238 -0
  119. data/lib/ipgeolocation_sdk/models/network_minimal.rb +229 -0
  120. data/lib/ipgeolocation_sdk/models/network_minimal_asn.rb +238 -0
  121. data/lib/ipgeolocation_sdk/models/network_minimal_company.rb +220 -0
  122. data/lib/ipgeolocation_sdk/models/parse_bulk_user_agent_strings_request.rb +222 -0
  123. data/lib/ipgeolocation_sdk/models/parse_user_agent_string_request.rb +220 -0
  124. data/lib/ipgeolocation_sdk/models/security.rb +310 -0
  125. data/lib/ipgeolocation_sdk/models/security_api_response.rb +292 -0
  126. data/lib/ipgeolocation_sdk/models/security_apixml_response.rb +292 -0
  127. data/lib/ipgeolocation_sdk/models/security_apixml_response_array.rb +292 -0
  128. data/lib/ipgeolocation_sdk/models/time_conversion_response.rb +247 -0
  129. data/lib/ipgeolocation_sdk/models/time_conversion_xml_response.rb +247 -0
  130. data/lib/ipgeolocation_sdk/models/time_zone.rb +301 -0
  131. data/lib/ipgeolocation_sdk/models/time_zone_detailed_response.rb +256 -0
  132. data/lib/ipgeolocation_sdk/models/time_zone_detailed_xml_response.rb +256 -0
  133. data/lib/ipgeolocation_sdk/models/time_zone_dst_end.rb +265 -0
  134. data/lib/ipgeolocation_sdk/models/time_zone_dst_start.rb +265 -0
  135. data/lib/ipgeolocation_sdk/models/timezone_airport.rb +319 -0
  136. data/lib/ipgeolocation_sdk/models/timezone_detail.rb +391 -0
  137. data/lib/ipgeolocation_sdk/models/timezone_detail_dst_end.rb +265 -0
  138. data/lib/ipgeolocation_sdk/models/timezone_detail_dst_start.rb +265 -0
  139. data/lib/ipgeolocation_sdk/models/timezone_location.rb +355 -0
  140. data/lib/ipgeolocation_sdk/models/timezone_locode.rb +283 -0
  141. data/lib/ipgeolocation_sdk/models/user_agent_data.rb +283 -0
  142. data/lib/ipgeolocation_sdk/models/user_agent_data_device.rb +247 -0
  143. data/lib/ipgeolocation_sdk/models/user_agent_data_engine.rb +247 -0
  144. data/lib/ipgeolocation_sdk/models/user_agent_data_operating_system.rb +256 -0
  145. data/lib/ipgeolocation_sdk/models/user_agent_xml_data.rb +283 -0
  146. data/lib/ipgeolocation_sdk/models/user_agent_xml_data_array.rb +283 -0
  147. data/lib/ipgeolocation_sdk/version.rb +15 -0
  148. data/lib/ipgeolocation_sdk.rb +107 -0
  149. data/spec/api/abuse_contact_api_spec.rb +48 -0
  150. data/spec/api/asn_lookup_api_spec.rb +50 -0
  151. data/spec/api/astronomy_api_spec.rb +54 -0
  152. data/spec/api/ip_location_api_spec.rb +67 -0
  153. data/spec/api/security_api_spec.rb +67 -0
  154. data/spec/api/time_conversion_api_spec.rb +60 -0
  155. data/spec/api/timezone_api_spec.rb +56 -0
  156. data/spec/api/user_agent_api_spec.rb +74 -0
  157. data/spec/models/abuse_response_spec.rb +42 -0
  158. data/spec/models/abuse_response_xml_spec.rb +42 -0
  159. data/spec/models/abuse_spec.rb +90 -0
  160. data/spec/models/asn_connection_spec.rb +48 -0
  161. data/spec/models/asn_response_asn_spec.rb +126 -0
  162. data/spec/models/asn_response_spec.rb +42 -0
  163. data/spec/models/asn_response_xml_asn_spec.rb +126 -0
  164. data/spec/models/asn_response_xml_spec.rb +42 -0
  165. data/spec/models/astronomy_evening_spec.rb +90 -0
  166. data/spec/models/astronomy_location_spec.rb +132 -0
  167. data/spec/models/astronomy_morning_spec.rb +90 -0
  168. data/spec/models/astronomy_response_spec.rb +48 -0
  169. data/spec/models/astronomy_spec.rb +186 -0
  170. data/spec/models/astronomy_xml_response_spec.rb +48 -0
  171. data/spec/models/country_metadata_spec.rb +48 -0
  172. data/spec/models/currency_spec.rb +48 -0
  173. data/spec/models/error_response_spec.rb +36 -0
  174. data/spec/models/error_xml_response_array_spec.rb +36 -0
  175. data/spec/models/error_xml_response_spec.rb +36 -0
  176. data/spec/models/geolocation_response_spec.rb +96 -0
  177. data/spec/models/geolocation_xml_response_array_spec.rb +96 -0
  178. data/spec/models/geolocation_xml_response_spec.rb +96 -0
  179. data/spec/models/get_bulk_ip_geolocation200_response_inner1_spec.rb +32 -0
  180. data/spec/models/get_bulk_ip_geolocation200_response_inner_spec.rb +32 -0
  181. data/spec/models/get_bulk_ip_geolocation_request_spec.rb +36 -0
  182. data/spec/models/get_bulk_ip_security_info200_response_inner1_spec.rb +32 -0
  183. data/spec/models/get_bulk_ip_security_info200_response_inner_spec.rb +32 -0
  184. data/spec/models/location_minimal_spec.rb +138 -0
  185. data/spec/models/location_spec.rb +156 -0
  186. data/spec/models/network_asn_spec.rb +96 -0
  187. data/spec/models/network_company_spec.rb +48 -0
  188. data/spec/models/network_minimal_asn_spec.rb +48 -0
  189. data/spec/models/network_minimal_company_spec.rb +36 -0
  190. data/spec/models/network_minimal_spec.rb +42 -0
  191. data/spec/models/network_spec.rb +48 -0
  192. data/spec/models/parse_bulk_user_agent_strings_request_spec.rb +36 -0
  193. data/spec/models/parse_user_agent_string_request_spec.rb +36 -0
  194. data/spec/models/security_api_response_spec.rb +84 -0
  195. data/spec/models/security_apixml_response_array_spec.rb +84 -0
  196. data/spec/models/security_apixml_response_spec.rb +84 -0
  197. data/spec/models/security_spec.rb +96 -0
  198. data/spec/models/time_conversion_response_spec.rb +54 -0
  199. data/spec/models/time_conversion_xml_response_spec.rb +54 -0
  200. data/spec/models/time_zone_detailed_response_spec.rb +60 -0
  201. data/spec/models/time_zone_detailed_xml_response_spec.rb +60 -0
  202. data/spec/models/time_zone_dst_end_spec.rb +66 -0
  203. data/spec/models/time_zone_dst_start_spec.rb +66 -0
  204. data/spec/models/time_zone_spec.rb +90 -0
  205. data/spec/models/timezone_airport_spec.rb +102 -0
  206. data/spec/models/timezone_detail_dst_end_spec.rb +66 -0
  207. data/spec/models/timezone_detail_dst_start_spec.rb +66 -0
  208. data/spec/models/timezone_detail_spec.rb +150 -0
  209. data/spec/models/timezone_location_spec.rb +126 -0
  210. data/spec/models/timezone_locode_spec.rb +78 -0
  211. data/spec/models/user_agent_data_device_spec.rb +54 -0
  212. data/spec/models/user_agent_data_engine_spec.rb +54 -0
  213. data/spec/models/user_agent_data_operating_system_spec.rb +60 -0
  214. data/spec/models/user_agent_data_spec.rb +78 -0
  215. data/spec/models/user_agent_xml_data_array_spec.rb +78 -0
  216. data/spec/models/user_agent_xml_data_spec.rb +78 -0
  217. data/spec/spec_helper.rb +111 -0
  218. metadata +373 -0
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,22 @@
1
+ # IpgeolocationSdk::ASNConnection
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **as_number** | **String** | | [optional] |
8
+ | **description** | **String** | | [optional] |
9
+ | **country** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ipgeolocation_sdk'
15
+
16
+ instance = IpgeolocationSdk::ASNConnection.new(
17
+ as_number: AS12779,
18
+ description: IT.Gate S.p.A.,
19
+ country: IT
20
+ )
21
+ ```
22
+
@@ -0,0 +1,48 @@
1
+ # IpgeolocationSdk::ASNResponseAsn
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **as_number** | **String** | | [optional] |
8
+ | **organization** | **String** | | [optional] |
9
+ | **country** | **String** | | [optional] |
10
+ | **asn_name** | **String** | | [optional] |
11
+ | **type** | **String** | | [optional] |
12
+ | **domain** | **String** | | [optional] |
13
+ | **date_allocated** | **Date** | | [optional] |
14
+ | **allocation_status** | **String** | | [optional] |
15
+ | **num_of_ipv4_routes** | **String** | | [optional] |
16
+ | **num_of_ipv6_routes** | **String** | | [optional] |
17
+ | **rir** | **String** | | [optional] |
18
+ | **routes** | **Array<String>** | It will only be included in the response, if you set include=routes in the request | [optional] |
19
+ | **upstreams** | [**Array<ASNConnection>**](ASNConnection.md) | It will only be included in the response, if you set include=upstreams in the request | [optional] |
20
+ | **downstreams** | [**Array<ASNConnection>**](ASNConnection.md) | It will only be included in the response, if you set include=downstreams in the request | [optional] |
21
+ | **peers** | [**Array<ASNConnection>**](ASNConnection.md) | It will only be included in the response, if you set include=peers in the request | [optional] |
22
+ | **whois_response** | **String** | It will only be included in the response, if you set include=whois_response in the request | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'ipgeolocation_sdk'
28
+
29
+ instance = IpgeolocationSdk::ASNResponseAsn.new(
30
+ as_number: AS3269,
31
+ organization: Telecom Italia S.p.A.,
32
+ country: IT,
33
+ asn_name: ASN-IBSNAZ,
34
+ type: ISP,
35
+ domain: business.telecomitalia.it,
36
+ date_allocated: Mon Nov 14 05:00:00 PKT 1994,
37
+ allocation_status: allocated,
38
+ num_of_ipv4_routes: 490,
39
+ num_of_ipv6_routes: 4,
40
+ rir: RIPE,
41
+ routes: ["192.76.177.0/24","216.165.96.0/20","216.165.89.0/24"],
42
+ upstreams: null,
43
+ downstreams: null,
44
+ peers: null,
45
+ whois_response: whois output as a single string...
46
+ )
47
+ ```
48
+
@@ -0,0 +1,89 @@
1
+ # IpgeolocationSdk::ASNLookupApi
2
+
3
+ All URIs are relative to *https://api.ipgeolocation.io/v2*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_asn_info**](ASNLookupApi.md#get_asn_info) | **GET** /asn | |
8
+
9
+
10
+ ## get_asn_info
11
+
12
+ > <ASNResponse> get_asn_info(opts)
13
+
14
+
15
+
16
+ ASN API provides comprehensive details for an ASN including the as name, organization name, the country of registration, associated domain, and its type (ISP, host provider, or business). The API also shows the allocation date of provided ASN and if it is currently allocated or not. It also contains the routing information including peering, upstreams, and downstreams to help understand the relationship between different ASNs. Example Use Cases: - Looking up ASN information for an IP address (e.g., `GET /asn?ip=8.8.8.8`) - Retrieving ASN information for a specific ASN number (e.g., `GET /asn?asn=12345`) - Getting peering relationships for an ASN (e.g., `GET /asn?asn=12345&include=peers`)
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'ipgeolocation_sdk'
23
+ # setup authorization
24
+ IpgeolocationSdk.configure do |config|
25
+ # Configure API key authorization: ApiKeyAuth
26
+ config.api_key['apiKey'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['apiKey'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = IpgeolocationSdk::ASNLookupApi.new
32
+ opts = {
33
+ ip: '8.8.8.8', # String | query parameter 'ip'.
34
+ asn: 1, # Integer | query paramter 'asn'.
35
+ include: 'peers', # String | This parameter can have four options: a) peers b) downstreams c) upstreams d) routes e) whois_response. You may add any of them in comma-separated way. In order to get the ASN details with peering data, pass peers string in the include parameter like mentioned below.
36
+ excludes: 'asn.date_allocated,asn.allocation_status', # String | You can exclude fields from the response according to you requirement with the exception of ip field. For example, you want to remove date_allocated and allocation_status from api response, you can put the keys in excludes parameter like this.
37
+ fields: 'asn.organization,asn.country,asn.downstreams' # String | You can filter out only those fields which you want to see in the response by using the fields parameter. To retrieve only the AS organization, its country and downstreams in api response, you can put the keys in fields parameter like this. API will combine these fields with the default ASN response. Note: Parameters `peers, downstreams, upstreams, routes, whois_response` can be used in both `include` , and `fields`. If you use include and fields at the same time, fields parameter will be considered only.
38
+ }
39
+
40
+ begin
41
+
42
+ result = api_instance.get_asn_info(opts)
43
+ p result
44
+ rescue IpgeolocationSdk::ApiError => e
45
+ puts "Error when calling ASNLookupApi->get_asn_info: #{e}"
46
+ end
47
+ ```
48
+
49
+ #### Using the get_asn_info_with_http_info variant
50
+
51
+ This returns an Array which contains the response data, status code and headers.
52
+
53
+ > <Array(<ASNResponse>, Integer, Hash)> get_asn_info_with_http_info(opts)
54
+
55
+ ```ruby
56
+ begin
57
+
58
+ data, status_code, headers = api_instance.get_asn_info_with_http_info(opts)
59
+ p status_code # => 2xx
60
+ p headers # => { ... }
61
+ p data # => <ASNResponse>
62
+ rescue IpgeolocationSdk::ApiError => e
63
+ puts "Error when calling ASNLookupApi->get_asn_info_with_http_info: #{e}"
64
+ end
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ | Name | Type | Description | Notes |
70
+ | ---- | ---- | ----------- | ----- |
71
+ | **ip** | **String** | query parameter &#39;ip&#39;. | [optional] |
72
+ | **asn** | **Integer** | query paramter &#39;asn&#39;. | [optional] |
73
+ | **include** | **String** | This parameter can have four options: a) peers b) downstreams c) upstreams d) routes e) whois_response. You may add any of them in comma-separated way. In order to get the ASN details with peering data, pass peers string in the include parameter like mentioned below. | [optional] |
74
+ | **excludes** | **String** | You can exclude fields from the response according to you requirement with the exception of ip field. For example, you want to remove date_allocated and allocation_status from api response, you can put the keys in excludes parameter like this. | [optional] |
75
+ | **fields** | **String** | You can filter out only those fields which you want to see in the response by using the fields parameter. To retrieve only the AS organization, its country and downstreams in api response, you can put the keys in fields parameter like this. API will combine these fields with the default ASN response. Note: Parameters &#x60;peers, downstreams, upstreams, routes, whois_response&#x60; can be used in both &#x60;include&#x60; , and &#x60;fields&#x60;. If you use include and fields at the same time, fields parameter will be considered only. | [optional] |
76
+
77
+ ### Return type
78
+
79
+ [**ASNResponse**](ASNResponse.md)
80
+
81
+ ### Authorization
82
+
83
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
84
+
85
+ ### HTTP request headers
86
+
87
+ - **Content-Type**: Not defined
88
+ - **Accept**: application/json, application/xml
89
+
@@ -0,0 +1,20 @@
1
+ # IpgeolocationSdk::ASNResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | IP address for which ASN information is returned. Present if the &#39;ip&#39; query parameter is used or no IP is specified (defaults to requester&#39;s IP). | [optional] |
8
+ | **asn** | [**ASNResponseAsn**](ASNResponseAsn.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ipgeolocation_sdk'
14
+
15
+ instance = IpgeolocationSdk::ASNResponse.new(
16
+ ip: 81.73.154.79,
17
+ asn: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # IpgeolocationSdk::ASNResponseXML
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | | [optional] |
8
+ | **asn** | [**ASNResponseXMLAsn**](ASNResponseXMLAsn.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ipgeolocation_sdk'
14
+
15
+ instance = IpgeolocationSdk::ASNResponseXML.new(
16
+ ip: 81.73.154.79,
17
+ asn: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,48 @@
1
+ # IpgeolocationSdk::ASNResponseXMLAsn
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **as_number** | **String** | | [optional] |
8
+ | **organization** | **String** | | [optional] |
9
+ | **country** | **String** | | [optional] |
10
+ | **asn_name** | **String** | | [optional] |
11
+ | **type** | **String** | | [optional] |
12
+ | **domain** | **String** | | [optional] |
13
+ | **date_allocated** | **Date** | | [optional] |
14
+ | **allocation_status** | **String** | | [optional] |
15
+ | **num_of_ipv4_routes** | **Integer** | | [optional] |
16
+ | **num_of_ipv6_routes** | **Integer** | | [optional] |
17
+ | **rir** | **String** | | [optional] |
18
+ | **routes** | **Array&lt;String&gt;** | It will only be included in the response, if you set include&#x3D;routes in the request | [optional] |
19
+ | **upstreams** | [**Array&lt;ASNConnection&gt;**](ASNConnection.md) | | [optional] |
20
+ | **downstreams** | [**Array&lt;ASNConnection&gt;**](ASNConnection.md) | | [optional] |
21
+ | **peers** | [**Array&lt;ASNConnection&gt;**](ASNConnection.md) | | [optional] |
22
+ | **whois_response** | **String** | | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'ipgeolocation_sdk'
28
+
29
+ instance = IpgeolocationSdk::ASNResponseXMLAsn.new(
30
+ as_number: AS3269,
31
+ organization: Telecom Italia S.p.A.,
32
+ country: IT,
33
+ asn_name: ASN-IBSNAZ,
34
+ type: ISP,
35
+ domain: business.telecomitalia.it,
36
+ date_allocated: Mon Nov 14 05:00:00 PKT 1994,
37
+ allocation_status: allocated,
38
+ num_of_ipv4_routes: 490,
39
+ num_of_ipv6_routes: 4,
40
+ rir: RIPE,
41
+ routes: [&quot;192.76.177.0/24&quot;,&quot;216.165.96.0/20&quot;,&quot;216.165.89.0/24&quot;],
42
+ upstreams: null,
43
+ downstreams: null,
44
+ peers: null,
45
+ whois_response: whois output as a single string...
46
+ )
47
+ ```
48
+
data/docs/Abuse.md ADDED
@@ -0,0 +1,40 @@
1
+ # IpgeolocationSdk::Abuse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **route** | **String** | | [optional] |
8
+ | **country** | **String** | | [optional] |
9
+ | **handle** | **String** | | [optional] |
10
+ | **name** | **String** | | [optional] |
11
+ | **organization** | **String** | | [optional] |
12
+ | **role** | **String** | | [optional] |
13
+ | **kind** | **String** | | [optional] |
14
+ | **address** | **String** | | [optional] |
15
+ | **emails** | **Array&lt;String&gt;** | | [optional] |
16
+ | **phone_numbers** | **Array&lt;String&gt;** | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'ipgeolocation_sdk'
22
+
23
+ instance = IpgeolocationSdk::Abuse.new(
24
+ route: 8.8.8.0/24,
25
+ country: US,
26
+ handle: ABUSE5250-ARIN,
27
+ name: Abuse,
28
+ organization: Abuse,
29
+ role: abuse,
30
+ kind: group,
31
+ address: 1600 Amphitheatre Parkway
32
+ Mountain View
33
+ CA
34
+ 94043
35
+ United States,
36
+ emails: [&quot;network-abuse@google.com&quot;],
37
+ phone_numbers: [&quot;+1-650-253-0000&quot;]
38
+ )
39
+ ```
40
+
@@ -0,0 +1,85 @@
1
+ # IpgeolocationSdk::AbuseContactApi
2
+
3
+ All URIs are relative to *https://api.ipgeolocation.io/v2*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_abuse_contact_info**](AbuseContactApi.md#get_abuse_contact_info) | **GET** /abuse | |
8
+
9
+
10
+ ## get_abuse_contact_info
11
+
12
+ > <AbuseResponse> get_abuse_contact_info(opts)
13
+
14
+
15
+
16
+ The Abuse Contact API provides essential contact information to report abusive activity associated with IP addresses. By querying an IP address (IPv4 or IPv6), users receive detailed abuse contact data, including the responsible organization, abuse handling role, contact emails, phone numbers, and registered address. This enables users to swiftly take action to report and mitigate threats such as spam, DDoS attacks, and phishing. In addition to abuse-specific contacts, the API also includes registration metadata like the registered country and abuse handle. This empowers cybersecurity teams, hosting providers, and compliance entities to take appropriate legal or administrative action.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'ipgeolocation_sdk'
23
+ # setup authorization
24
+ IpgeolocationSdk.configure do |config|
25
+ # Configure API key authorization: ApiKeyAuth
26
+ config.api_key['apiKey'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['apiKey'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = IpgeolocationSdk::AbuseContactApi.new
32
+ opts = {
33
+ ip: '8.8.8.8', # String | query parameter 'ip'.
34
+ excludes: 'abuse.handle,abuse.emails', # String | You can exclude specific fields from the API response (except the ip field) by listing them in the excludes parameter as a comma-separated list. For example, you want to remove emails and handle from api response, you can put the keys in excludes parameter like this.
35
+ fields: 'abuse.role,abuse.emails' # String | You can customize the API response by using the fields parameter to include only the specific data you need. For example, to retrieve only the role and emails, specify these keys in the fields parameter as shown below.
36
+ }
37
+
38
+ begin
39
+
40
+ result = api_instance.get_abuse_contact_info(opts)
41
+ p result
42
+ rescue IpgeolocationSdk::ApiError => e
43
+ puts "Error when calling AbuseContactApi->get_abuse_contact_info: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the get_abuse_contact_info_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(<AbuseResponse>, Integer, Hash)> get_abuse_contact_info_with_http_info(opts)
52
+
53
+ ```ruby
54
+ begin
55
+
56
+ data, status_code, headers = api_instance.get_abuse_contact_info_with_http_info(opts)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => <AbuseResponse>
60
+ rescue IpgeolocationSdk::ApiError => e
61
+ puts "Error when calling AbuseContactApi->get_abuse_contact_info_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **ip** | **String** | query parameter &#39;ip&#39;. | [optional] |
70
+ | **excludes** | **String** | You can exclude specific fields from the API response (except the ip field) by listing them in the excludes parameter as a comma-separated list. For example, you want to remove emails and handle from api response, you can put the keys in excludes parameter like this. | [optional] |
71
+ | **fields** | **String** | You can customize the API response by using the fields parameter to include only the specific data you need. For example, to retrieve only the role and emails, specify these keys in the fields parameter as shown below. | [optional] |
72
+
73
+ ### Return type
74
+
75
+ [**AbuseResponse**](AbuseResponse.md)
76
+
77
+ ### Authorization
78
+
79
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: Not defined
84
+ - **Accept**: application/json, application/xml
85
+
@@ -0,0 +1,20 @@
1
+ # IpgeolocationSdk::AbuseResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | | [optional] |
8
+ | **abuse** | [**Abuse**](Abuse.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ipgeolocation_sdk'
14
+
15
+ instance = IpgeolocationSdk::AbuseResponse.new(
16
+ ip: 8.8.8.8,
17
+ abuse: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # IpgeolocationSdk::AbuseResponseXML
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | | [optional] |
8
+ | **abuse** | [**Abuse**](Abuse.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ipgeolocation_sdk'
14
+
15
+ instance = IpgeolocationSdk::AbuseResponseXML.new(
16
+ ip: 8.8.8.8,
17
+ abuse: null
18
+ )
19
+ ```
20
+
data/docs/Astronomy.md ADDED
@@ -0,0 +1,68 @@
1
+ # IpgeolocationSdk::Astronomy
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **time_zone** | **String** | | [optional] |
8
+ | **date** | **String** | | [optional] |
9
+ | **current_time** | **String** | | [optional] |
10
+ | **mid_night** | **String** | | [optional] |
11
+ | **night_end** | **String** | | [optional] |
12
+ | **morning** | [**AstronomyMorning**](AstronomyMorning.md) | | [optional] |
13
+ | **sunrise** | **String** | | [optional] |
14
+ | **sunset** | **String** | | [optional] |
15
+ | **evening** | [**AstronomyEvening**](AstronomyEvening.md) | | [optional] |
16
+ | **night_begin** | **String** | | [optional] |
17
+ | **sun_status** | **String** | | [optional] |
18
+ | **solar_noon** | **String** | | [optional] |
19
+ | **day_length** | **String** | | [optional] |
20
+ | **sun_altitude** | **Float** | | [optional] |
21
+ | **sun_distance** | **Float** | | [optional] |
22
+ | **sun_azimuth** | **Float** | | [optional] |
23
+ | **moon_phase** | **String** | | [optional] |
24
+ | **moonrise** | **String** | | [optional] |
25
+ | **moonset** | **String** | | [optional] |
26
+ | **moon_status** | **String** | | [optional] |
27
+ | **moon_altitude** | **Float** | | [optional] |
28
+ | **moon_distance** | **Float** | | [optional] |
29
+ | **moon_azimuth** | **Float** | | [optional] |
30
+ | **moon_parallactic_angle** | **Float** | | [optional] |
31
+ | **moon_illumination_percentage** | **String** | | [optional] |
32
+ | **moon_angle** | **Float** | | [optional] |
33
+
34
+ ## Example
35
+
36
+ ```ruby
37
+ require 'ipgeolocation_sdk'
38
+
39
+ instance = IpgeolocationSdk::Astronomy.new(
40
+ time_zone: America/Los_Angeles,
41
+ date: 2025-07-17,
42
+ current_time: 08:03:36.532,
43
+ mid_night: 01:02,
44
+ night_end: 03:40,
45
+ morning: null,
46
+ sunrise: 05:39,
47
+ sunset: 20:24,
48
+ evening: null,
49
+ night_begin: 22:23,
50
+ sun_status: -,
51
+ solar_noon: 13:02,
52
+ day_length: 14:45,
53
+ sun_altitude: 24.957683470850487,
54
+ sun_distance: 152059278.3394745,
55
+ sun_azimuth: 82.93803947255543,
56
+ moon_phase: LAST_QUARTER,
57
+ moonrise: -:-,
58
+ moonset: 13:04,
59
+ moon_status: -,
60
+ moon_altitude: 50.865120808868284,
61
+ moon_distance: 371690.2207058187,
62
+ moon_azimuth: 224.27457358894264,
63
+ moon_parallactic_angle: 32.4113797557535,
64
+ moon_illumination_percentage: -55.99,
65
+ moon_angle: 263.11859022190265
66
+ )
67
+ ```
68
+
@@ -0,0 +1,97 @@
1
+ # IpgeolocationSdk::AstronomyApi
2
+
3
+ All URIs are relative to *https://api.ipgeolocation.io/v2*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_astronomy_details**](AstronomyApi.md#get_astronomy_details) | **GET** /astronomy | |
8
+
9
+
10
+ ## get_astronomy_details
11
+
12
+ > <AstronomyResponse> get_astronomy_details(opts)
13
+
14
+
15
+
16
+ The Astronomy API provides the location-based rise and set times for the Sun and Moon along with the current position, distance from earth, and azimuth of the Sun and the Moon for a specific date at the queried time.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'ipgeolocation_sdk'
23
+ # setup authorization
24
+ IpgeolocationSdk.configure do |config|
25
+ # Configure API key authorization: ApiKeyAuth
26
+ config.api_key['apiKey'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['apiKey'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = IpgeolocationSdk::AstronomyApi.new
32
+ opts = {
33
+ ip: '8.8.8.8', # String | query paramter 'ip'. If not provided, will be your network IP
34
+ location: 'New York, US', # String | query paramter 'location'. If not provided, will be your ip location
35
+ lat: '40.76473', # String | query paramter 'lat'.
36
+ long: '-74.00084', # String | query paramter 'long'.
37
+ time_zone: 'Europe/London', # String |
38
+ date: '2025-04-22', # String | The date (YYYY-MM-DD) to lookup for. default will be the current date
39
+ elevation: 9, # Float | query parameter 'elevation'
40
+ output: 'json', # String | Desired output format.
41
+ lang: 'en' # String | By default, the API responds in English. You can change the response language by passing the language code as a query parameter `lang`. Multi language feature is available only for `paid users`.
42
+ }
43
+
44
+ begin
45
+
46
+ result = api_instance.get_astronomy_details(opts)
47
+ p result
48
+ rescue IpgeolocationSdk::ApiError => e
49
+ puts "Error when calling AstronomyApi->get_astronomy_details: #{e}"
50
+ end
51
+ ```
52
+
53
+ #### Using the get_astronomy_details_with_http_info variant
54
+
55
+ This returns an Array which contains the response data, status code and headers.
56
+
57
+ > <Array(<AstronomyResponse>, Integer, Hash)> get_astronomy_details_with_http_info(opts)
58
+
59
+ ```ruby
60
+ begin
61
+
62
+ data, status_code, headers = api_instance.get_astronomy_details_with_http_info(opts)
63
+ p status_code # => 2xx
64
+ p headers # => { ... }
65
+ p data # => <AstronomyResponse>
66
+ rescue IpgeolocationSdk::ApiError => e
67
+ puts "Error when calling AstronomyApi->get_astronomy_details_with_http_info: #{e}"
68
+ end
69
+ ```
70
+
71
+ ### Parameters
72
+
73
+ | Name | Type | Description | Notes |
74
+ | ---- | ---- | ----------- | ----- |
75
+ | **ip** | **String** | query paramter &#39;ip&#39;. If not provided, will be your network IP | [optional] |
76
+ | **location** | **String** | query paramter &#39;location&#39;. If not provided, will be your ip location | [optional] |
77
+ | **lat** | **String** | query paramter &#39;lat&#39;. | [optional] |
78
+ | **long** | **String** | query paramter &#39;long&#39;. | [optional] |
79
+ | **time_zone** | **String** | | [optional] |
80
+ | **date** | **String** | The date (YYYY-MM-DD) to lookup for. default will be the current date | [optional] |
81
+ | **elevation** | **Float** | query parameter &#39;elevation&#39; | [optional] |
82
+ | **output** | **String** | Desired output format. | [optional] |
83
+ | **lang** | **String** | By default, the API responds in English. You can change the response language by passing the language code as a query parameter &#x60;lang&#x60;. Multi language feature is available only for &#x60;paid users&#x60;. | [optional] |
84
+
85
+ ### Return type
86
+
87
+ [**AstronomyResponse**](AstronomyResponse.md)
88
+
89
+ ### Authorization
90
+
91
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: Not defined
96
+ - **Accept**: application/json, application/xml
97
+
@@ -0,0 +1,36 @@
1
+ # IpgeolocationSdk::AstronomyEvening
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **golden_hour_begin** | **String** | | [optional] |
8
+ | **golden_hour_end** | **String** | | [optional] |
9
+ | **blue_hour_begin** | **String** | | [optional] |
10
+ | **blue_hour_end** | **String** | | [optional] |
11
+ | **civil_twilight_begin** | **String** | | [optional] |
12
+ | **civil_twilight_end** | **String** | | [optional] |
13
+ | **nautical_twilight_begin** | **String** | | [optional] |
14
+ | **nautical_twilight_end** | **String** | | [optional] |
15
+ | **astronomical_twilight_begin** | **String** | | [optional] |
16
+ | **astronomical_twilight_end** | **String** | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'ipgeolocation_sdk'
22
+
23
+ instance = IpgeolocationSdk::AstronomyEvening.new(
24
+ golden_hour_begin: 19:44,
25
+ golden_hour_end: 20:44,
26
+ blue_hour_begin: 20:44,
27
+ blue_hour_end: 21:09,
28
+ civil_twilight_begin: 20:24,
29
+ civil_twilight_end: 20:56,
30
+ nautical_twilight_begin: 20:56,
31
+ nautical_twilight_end: 21:37,
32
+ astronomical_twilight_begin: 21:37,
33
+ astronomical_twilight_end: 22:23
34
+ )
35
+ ```
36
+