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
@@ -0,0 +1,175 @@
1
+ # IpgeolocationSdk::IPLocationApi
2
+
3
+ All URIs are relative to *https://api.ipgeolocation.io/v2*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_bulk_ip_geolocation**](IPLocationApi.md#get_bulk_ip_geolocation) | **POST** /ipgeo-bulk | |
8
+ | [**get_ip_geolocation**](IPLocationApi.md#get_ip_geolocation) | **GET** /ipgeo | |
9
+
10
+
11
+ ## get_bulk_ip_geolocation
12
+
13
+ > <Array<GetBulkIpGeolocation200ResponseInner>> get_bulk_ip_geolocation(get_bulk_ip_geolocation_request, opts)
14
+
15
+
16
+
17
+ This feature is available only on our paid API subscriptions (STANDARD or ADVANCED). This endpoint allows you to perform the geolocation lookup for multiple IPv4, IPv6 addresses or domain names (maximum 50,000) at the same time. The requests count per lookup is equal to total IP addresses or domain names passed. To perform bulk IP Geolocation Lookup, send a POST request and pass the \"ips\" array as JSON data along with it.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'ipgeolocation_sdk'
24
+ # setup authorization
25
+ IpgeolocationSdk.configure do |config|
26
+ # Configure API key authorization: ApiKeyAuth
27
+ config.api_key['apiKey'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ # config.api_key_prefix['apiKey'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = IpgeolocationSdk::IPLocationApi.new
33
+ get_bulk_ip_geolocation_request = IpgeolocationSdk::GetBulkIpGeolocationRequest.new # GetBulkIpGeolocationRequest |
34
+ opts = {
35
+ 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`.
36
+ fields: 'location, location.country_name, network.asn.organization', # String | you can filter the API response by specifying the fields that you need, instead of getting the full response. To do this, pass the desired field names using the `fields` query parameter with each field represented as a dot-separated path.
37
+ excludes: 'location.continent_code,currency,network', # String | you can also filter the API response by excluding specific fields (except the IP address) that you don't need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path
38
+ include: 'security', # String | IP Geolocation API also provides IP-Security, abuse, timezone, user-agent and DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting information on Advanced API subscription, but doesn't respond it by default. To get these information along with the geolocation information, you must pass the `include=security` or `include=abuse` or `include=dma` or `include=time_zone` or `include=user-agent` or you can fetch multiples by adding values in comma-separated way. In addition to that, IPGeolocation API also provide hostname lookup for an IP address on all the paid API subscriptions (STANDARD and ADVANCED), but doesn't respond it by default. To get the hostname for an IP address, you can pass one of the three values `hostname, liveHostname, hostnameFallbackLive` as a URL parameter `include=`.
39
+ output: 'json' # String | Desired output format(json or xml).
40
+ }
41
+
42
+ begin
43
+
44
+ result = api_instance.get_bulk_ip_geolocation(get_bulk_ip_geolocation_request, opts)
45
+ p result
46
+ rescue IpgeolocationSdk::ApiError => e
47
+ puts "Error when calling IPLocationApi->get_bulk_ip_geolocation: #{e}"
48
+ end
49
+ ```
50
+
51
+ #### Using the get_bulk_ip_geolocation_with_http_info variant
52
+
53
+ This returns an Array which contains the response data, status code and headers.
54
+
55
+ > <Array(<Array<GetBulkIpGeolocation200ResponseInner>>, Integer, Hash)> get_bulk_ip_geolocation_with_http_info(get_bulk_ip_geolocation_request, opts)
56
+
57
+ ```ruby
58
+ begin
59
+
60
+ data, status_code, headers = api_instance.get_bulk_ip_geolocation_with_http_info(get_bulk_ip_geolocation_request, opts)
61
+ p status_code # => 2xx
62
+ p headers # => { ... }
63
+ p data # => <Array<GetBulkIpGeolocation200ResponseInner>>
64
+ rescue IpgeolocationSdk::ApiError => e
65
+ puts "Error when calling IPLocationApi->get_bulk_ip_geolocation_with_http_info: #{e}"
66
+ end
67
+ ```
68
+
69
+ ### Parameters
70
+
71
+ | Name | Type | Description | Notes |
72
+ | ---- | ---- | ----------- | ----- |
73
+ | **get_bulk_ip_geolocation_request** | [**GetBulkIpGeolocationRequest**](GetBulkIpGeolocationRequest.md) | | |
74
+ | **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] |
75
+ | **fields** | **String** | you can filter the API response by specifying the fields that you need, instead of getting the full response. To do this, pass the desired field names using the &#x60;fields&#x60; query parameter with each field represented as a dot-separated path. | [optional] |
76
+ | **excludes** | **String** | you can also filter the API response by excluding specific fields (except the IP address) that you don&#39;t need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path | [optional] |
77
+ | **include** | **String** | IP Geolocation API also provides IP-Security, abuse, timezone, user-agent and DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting information on Advanced API subscription, but doesn&#39;t respond it by default. To get these information along with the geolocation information, you must pass the &#x60;include&#x3D;security&#x60; or &#x60;include&#x3D;abuse&#x60; or &#x60;include&#x3D;dma&#x60; or &#x60;include&#x3D;time_zone&#x60; or &#x60;include&#x3D;user-agent&#x60; or you can fetch multiples by adding values in comma-separated way. In addition to that, IPGeolocation API also provide hostname lookup for an IP address on all the paid API subscriptions (STANDARD and ADVANCED), but doesn&#39;t respond it by default. To get the hostname for an IP address, you can pass one of the three values &#x60;hostname, liveHostname, hostnameFallbackLive&#x60; as a URL parameter &#x60;include&#x3D;&#x60;. | [optional] |
78
+ | **output** | **String** | Desired output format(json or xml). | [optional] |
79
+
80
+ ### Return type
81
+
82
+ [**Array&lt;GetBulkIpGeolocation200ResponseInner&gt;**](GetBulkIpGeolocation200ResponseInner.md)
83
+
84
+ ### Authorization
85
+
86
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
87
+
88
+ ### HTTP request headers
89
+
90
+ - **Content-Type**: application/json
91
+ - **Accept**: application/json, application/xml
92
+
93
+
94
+ ## get_ip_geolocation
95
+
96
+ > <GeolocationResponse> get_ip_geolocation(opts)
97
+
98
+
99
+
100
+ IP Geolocation API provides real-time and accurate geolocation, network, abuse, and security information for any IPv4 or IPv6 address and domain name along with the user-agent detail for the provided user-agent string. You can geolocate your online visitors and provide them the customized user-experience accordingly.
101
+
102
+ ### Examples
103
+
104
+ ```ruby
105
+ require 'time'
106
+ require 'ipgeolocation_sdk'
107
+ # setup authorization
108
+ IpgeolocationSdk.configure do |config|
109
+ # Configure API key authorization: ApiKeyAuth
110
+ config.api_key['apiKey'] = 'YOUR API KEY'
111
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
112
+ # config.api_key_prefix['apiKey'] = 'Bearer'
113
+ end
114
+
115
+ api_instance = IpgeolocationSdk::IPLocationApi.new
116
+ opts = {
117
+ ip: '8.8.8.8 OR dns.google.com', # String | In order to find geolocation information about an IP (ipv4 ipv6) address or a domain name, pass it as a query parameter ip. When this endpoint is queried without an IP address, it returns the geolocation information of the device/client which is calling it
118
+ 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`.
119
+ fields: 'location, location.country_name, network.asn.organization', # String | you can filter the API response by specifying the fields that you need, instead of getting the full response. To do this, pass the desired field names using the `fields` query parameter with each field represented as a dot-separated path.
120
+ excludes: 'location.continent_code,currency,network', # String | you can also filter the API response by excluding specific fields (except the IP address) that you don't need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path
121
+ include: 'security', # String | IP Geolocation API also provides IP-Security, abuse, timezone, user-agent and DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting information on Advanced API subscription, but doesn't respond it by default. To get these information along with the geolocation information, you must pass the `include=security` or `include=abuse` or `include=dma` or `include=time_zone` or `include=user-agent` or you can fetch multiples by adding values in comma-separated way. In addition to that, IPGeolocation API also provide hostname lookup for an IP address on all the paid API subscriptions (STANDARD and ADVANCED), but doesn't respond it by default. To get the hostname for an IP address, you can pass one of the three values `hostname, liveHostname, hostnameFallbackLive` as a URL parameter `include=`.
122
+ output: 'json' # String | Desired output format (json or xml).
123
+ }
124
+
125
+ begin
126
+
127
+ result = api_instance.get_ip_geolocation(opts)
128
+ p result
129
+ rescue IpgeolocationSdk::ApiError => e
130
+ puts "Error when calling IPLocationApi->get_ip_geolocation: #{e}"
131
+ end
132
+ ```
133
+
134
+ #### Using the get_ip_geolocation_with_http_info variant
135
+
136
+ This returns an Array which contains the response data, status code and headers.
137
+
138
+ > <Array(<GeolocationResponse>, Integer, Hash)> get_ip_geolocation_with_http_info(opts)
139
+
140
+ ```ruby
141
+ begin
142
+
143
+ data, status_code, headers = api_instance.get_ip_geolocation_with_http_info(opts)
144
+ p status_code # => 2xx
145
+ p headers # => { ... }
146
+ p data # => <GeolocationResponse>
147
+ rescue IpgeolocationSdk::ApiError => e
148
+ puts "Error when calling IPLocationApi->get_ip_geolocation_with_http_info: #{e}"
149
+ end
150
+ ```
151
+
152
+ ### Parameters
153
+
154
+ | Name | Type | Description | Notes |
155
+ | ---- | ---- | ----------- | ----- |
156
+ | **ip** | **String** | In order to find geolocation information about an IP (ipv4 ipv6) address or a domain name, pass it as a query parameter ip. When this endpoint is queried without an IP address, it returns the geolocation information of the device/client which is calling it | [optional] |
157
+ | **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] |
158
+ | **fields** | **String** | you can filter the API response by specifying the fields that you need, instead of getting the full response. To do this, pass the desired field names using the &#x60;fields&#x60; query parameter with each field represented as a dot-separated path. | [optional] |
159
+ | **excludes** | **String** | you can also filter the API response by excluding specific fields (except the IP address) that you don&#39;t need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path | [optional] |
160
+ | **include** | **String** | IP Geolocation API also provides IP-Security, abuse, timezone, user-agent and DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting information on Advanced API subscription, but doesn&#39;t respond it by default. To get these information along with the geolocation information, you must pass the &#x60;include&#x3D;security&#x60; or &#x60;include&#x3D;abuse&#x60; or &#x60;include&#x3D;dma&#x60; or &#x60;include&#x3D;time_zone&#x60; or &#x60;include&#x3D;user-agent&#x60; or you can fetch multiples by adding values in comma-separated way. In addition to that, IPGeolocation API also provide hostname lookup for an IP address on all the paid API subscriptions (STANDARD and ADVANCED), but doesn&#39;t respond it by default. To get the hostname for an IP address, you can pass one of the three values &#x60;hostname, liveHostname, hostnameFallbackLive&#x60; as a URL parameter &#x60;include&#x3D;&#x60;. | [optional] |
161
+ | **output** | **String** | Desired output format (json or xml). | [optional] |
162
+
163
+ ### Return type
164
+
165
+ [**GeolocationResponse**](GeolocationResponse.md)
166
+
167
+ ### Authorization
168
+
169
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
170
+
171
+ ### HTTP request headers
172
+
173
+ - **Content-Type**: Not defined
174
+ - **Accept**: application/json, application/xml
175
+
data/docs/Location.md ADDED
@@ -0,0 +1,58 @@
1
+ # IpgeolocationSdk::Location
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **continent_code** | **String** | | [optional] |
8
+ | **continent_name** | **String** | | [optional] |
9
+ | **country_code2** | **String** | | [optional] |
10
+ | **country_code3** | **String** | | [optional] |
11
+ | **country_name** | **String** | | [optional] |
12
+ | **country_name_official** | **String** | | [optional] |
13
+ | **country_capital** | **String** | | [optional] |
14
+ | **state_prov** | **String** | | [optional] |
15
+ | **state_code** | **String** | | [optional] |
16
+ | **district** | **String** | | [optional] |
17
+ | **city** | **String** | | [optional] |
18
+ | **zipcode** | **String** | | [optional] |
19
+ | **latitude** | **String** | | [optional] |
20
+ | **longitude** | **String** | | [optional] |
21
+ | **is_eu** | **Boolean** | | [optional] |
22
+ | **country_flag** | **String** | | [optional] |
23
+ | **geoname_id** | **String** | | [optional] |
24
+ | **country_emoji** | **String** | | [optional] |
25
+ | **accuracy_radius** | **String** | | [optional] |
26
+ | **locality** | **String** | | [optional] |
27
+ | **dma_code** | **String** | | [optional] |
28
+
29
+ ## Example
30
+
31
+ ```ruby
32
+ require 'ipgeolocation_sdk'
33
+
34
+ instance = IpgeolocationSdk::Location.new(
35
+ continent_code: NA,
36
+ continent_name: North America,
37
+ country_code2: US,
38
+ country_code3: USA,
39
+ country_name: United States,
40
+ country_name_official: United States of America,
41
+ country_capital: Washington, D.C.,
42
+ state_prov: California,
43
+ state_code: US-CA,
44
+ district: Santa Clara,
45
+ city: Mountain View,
46
+ zipcode: 94043-1351,
47
+ latitude: 37.42240,
48
+ longitude: -122.08421,
49
+ is_eu: false,
50
+ country_flag: https://ipgeolocation.io/static/flags/us_64.png,
51
+ geoname_id: 6301403,
52
+ country_emoji: ,
53
+ accuracy_radius: 1000,
54
+ locality: Mountain View,
55
+ dma_code: 807
56
+ )
57
+ ```
58
+
@@ -0,0 +1,52 @@
1
+ # IpgeolocationSdk::LocationMinimal
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **continent_code** | **String** | | [optional] |
8
+ | **continent_name** | **String** | | [optional] |
9
+ | **country_code2** | **String** | | [optional] |
10
+ | **country_code3** | **String** | | [optional] |
11
+ | **country_name** | **String** | | [optional] |
12
+ | **country_name_official** | **String** | | [optional] |
13
+ | **country_capital** | **String** | | [optional] |
14
+ | **state_prov** | **String** | | [optional] |
15
+ | **state_code** | **String** | | [optional] |
16
+ | **district** | **String** | | [optional] |
17
+ | **city** | **String** | | [optional] |
18
+ | **zipcode** | **String** | | [optional] |
19
+ | **latitude** | **String** | | [optional] |
20
+ | **longitude** | **String** | | [optional] |
21
+ | **is_eu** | **Boolean** | | [optional] |
22
+ | **country_flag** | **String** | | [optional] |
23
+ | **geoname_id** | **String** | | [optional] |
24
+ | **country_emoji** | **String** | | [optional] |
25
+
26
+ ## Example
27
+
28
+ ```ruby
29
+ require 'ipgeolocation_sdk'
30
+
31
+ instance = IpgeolocationSdk::LocationMinimal.new(
32
+ continent_code: NA,
33
+ continent_name: North America,
34
+ country_code2: US,
35
+ country_code3: USA,
36
+ country_name: United States,
37
+ country_name_official: United States of America,
38
+ country_capital: Washington, D.C.,
39
+ state_prov: California,
40
+ state_code: US-CA,
41
+ district: Santa Clara,
42
+ city: Mountain View,
43
+ zipcode: 94043-1351,
44
+ latitude: 37.42240,
45
+ longitude: -122.08421,
46
+ is_eu: false,
47
+ country_flag: https://ipgeolocation.io/static/flags/us_64.png,
48
+ geoname_id: 6301403,
49
+ country_emoji:
50
+ )
51
+ ```
52
+
data/docs/Network.md ADDED
@@ -0,0 +1,22 @@
1
+ # IpgeolocationSdk::Network
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **asn** | [**NetworkAsn**](NetworkAsn.md) | | [optional] |
8
+ | **connection_type** | **String** | | [optional] |
9
+ | **company** | [**NetworkCompany**](NetworkCompany.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ipgeolocation_sdk'
15
+
16
+ instance = IpgeolocationSdk::Network.new(
17
+ asn: null,
18
+ connection_type: wired,
19
+ company: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,38 @@
1
+ # IpgeolocationSdk::NetworkAsn
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** | **String** | | [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
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'ipgeolocation_sdk'
23
+
24
+ instance = IpgeolocationSdk::NetworkAsn.new(
25
+ as_number: AS15169,
26
+ organization: Google LLC,
27
+ country: US,
28
+ asn_name: GOOGLE,
29
+ type: isp,
30
+ domain: about.google,
31
+ date_allocated: ,
32
+ allocation_status: Assigned,
33
+ num_of_ipv4_routes: 1099,
34
+ num_of_ipv6_routes: 107,
35
+ rir: ARIN
36
+ )
37
+ ```
38
+
@@ -0,0 +1,22 @@
1
+ # IpgeolocationSdk::NetworkCompany
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | [optional] |
8
+ | **type** | **String** | | [optional] |
9
+ | **domain** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ipgeolocation_sdk'
15
+
16
+ instance = IpgeolocationSdk::NetworkCompany.new(
17
+ name: Google LLC,
18
+ type: hosting,
19
+ domain: google.com
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # IpgeolocationSdk::NetworkMinimal
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **asn** | [**NetworkMinimalAsn**](NetworkMinimalAsn.md) | | [optional] |
8
+ | **company** | [**NetworkMinimalCompany**](NetworkMinimalCompany.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ipgeolocation_sdk'
14
+
15
+ instance = IpgeolocationSdk::NetworkMinimal.new(
16
+ asn: null,
17
+ company: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # IpgeolocationSdk::NetworkMinimalAsn
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **as_number** | **String** | | [optional] |
8
+ | **organization** | **String** | | [optional] |
9
+ | **country** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ipgeolocation_sdk'
15
+
16
+ instance = IpgeolocationSdk::NetworkMinimalAsn.new(
17
+ as_number: AS15169,
18
+ organization: Google LLC,
19
+ country: US
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # IpgeolocationSdk::NetworkMinimalCompany
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ipgeolocation_sdk'
13
+
14
+ instance = IpgeolocationSdk::NetworkMinimalCompany.new(
15
+ name: Google LLC
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # IpgeolocationSdk::ParseBulkUserAgentStringsRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ua_strings** | **Array&lt;String&gt;** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ipgeolocation_sdk'
13
+
14
+ instance = IpgeolocationSdk::ParseBulkUserAgentStringsRequest.new(
15
+ ua_strings: [&quot;Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36&quot;,&quot;Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+&quot;,&quot;Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800; rotate)&quot;]
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # IpgeolocationSdk::ParseUserAgentStringRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ua_string** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ipgeolocation_sdk'
13
+
14
+ instance = IpgeolocationSdk::ParseUserAgentStringRequest.new(
15
+ ua_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
16
+ )
17
+ ```
18
+
data/docs/Security.md ADDED
@@ -0,0 +1,38 @@
1
+ # IpgeolocationSdk::Security
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **threat_score** | **Integer** | | [optional] |
8
+ | **is_tor** | **Boolean** | | [optional] |
9
+ | **is_proxy** | **Boolean** | | [optional] |
10
+ | **proxy_type** | **String** | | [optional] |
11
+ | **proxy_provider** | **String** | | [optional] |
12
+ | **is_anonymous** | **Boolean** | | [optional] |
13
+ | **is_known_attacker** | **Boolean** | | [optional] |
14
+ | **is_spam** | **Boolean** | | [optional] |
15
+ | **is_bot** | **Boolean** | | [optional] |
16
+ | **is_cloud_provider** | **Boolean** | | [optional] |
17
+ | **cloud_provider** | **String** | | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'ipgeolocation_sdk'
23
+
24
+ instance = IpgeolocationSdk::Security.new(
25
+ threat_score: 80,
26
+ is_tor: false,
27
+ is_proxy: true,
28
+ proxy_type: VPN,
29
+ proxy_provider: ,
30
+ is_anonymous: true,
31
+ is_known_attacker: true,
32
+ is_spam: false,
33
+ is_bot: false,
34
+ is_cloud_provider: false,
35
+ cloud_provider:
36
+ )
37
+ ```
38
+
@@ -0,0 +1,34 @@
1
+ # IpgeolocationSdk::SecurityAPIResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | | [optional] |
8
+ | **hostname** | **String** | | [optional] |
9
+ | **security** | [**Security**](Security.md) | | [optional] |
10
+ | **location** | [**LocationMinimal**](LocationMinimal.md) | | [optional] |
11
+ | **network** | [**NetworkMinimal**](NetworkMinimal.md) | | [optional] |
12
+ | **time_zone** | [**TimeZone**](TimeZone.md) | | [optional] |
13
+ | **user_agent** | [**UserAgentData**](UserAgentData.md) | | [optional] |
14
+ | **country_metadata** | [**CountryMetadata**](CountryMetadata.md) | | [optional] |
15
+ | **currency** | [**Currency**](Currency.md) | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ipgeolocation_sdk'
21
+
22
+ instance = IpgeolocationSdk::SecurityAPIResponse.new(
23
+ ip: 8.8.8.8,
24
+ hostname: 195-154-221-54.rev.poneytelecom.eu,
25
+ security: null,
26
+ location: null,
27
+ network: null,
28
+ time_zone: null,
29
+ user_agent: null,
30
+ country_metadata: null,
31
+ currency: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,34 @@
1
+ # IpgeolocationSdk::SecurityAPIXMLResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | | [optional] |
8
+ | **hostname** | **String** | | [optional] |
9
+ | **security** | [**Security**](Security.md) | | [optional] |
10
+ | **location** | [**LocationMinimal**](LocationMinimal.md) | | [optional] |
11
+ | **network** | [**NetworkMinimal**](NetworkMinimal.md) | | [optional] |
12
+ | **time_zone** | [**TimeZone**](TimeZone.md) | | [optional] |
13
+ | **user_agent** | [**UserAgentData**](UserAgentData.md) | | [optional] |
14
+ | **country_metadata** | [**CountryMetadata**](CountryMetadata.md) | | [optional] |
15
+ | **currency** | [**Currency**](Currency.md) | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ipgeolocation_sdk'
21
+
22
+ instance = IpgeolocationSdk::SecurityAPIXMLResponse.new(
23
+ ip: 8.8.8.8,
24
+ hostname: 195-154-221-54.rev.poneytelecom.eu,
25
+ security: null,
26
+ location: null,
27
+ network: null,
28
+ time_zone: null,
29
+ user_agent: null,
30
+ country_metadata: null,
31
+ currency: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,34 @@
1
+ # IpgeolocationSdk::SecurityAPIXMLResponseArray
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ip** | **String** | | [optional] |
8
+ | **hostname** | **String** | | [optional] |
9
+ | **security** | [**Security**](Security.md) | | [optional] |
10
+ | **location** | [**LocationMinimal**](LocationMinimal.md) | | [optional] |
11
+ | **network** | [**NetworkMinimal**](NetworkMinimal.md) | | [optional] |
12
+ | **time_zone** | [**TimeZone**](TimeZone.md) | | [optional] |
13
+ | **user_agent** | [**UserAgentData**](UserAgentData.md) | | [optional] |
14
+ | **country_metadata** | [**CountryMetadata**](CountryMetadata.md) | | [optional] |
15
+ | **currency** | [**Currency**](Currency.md) | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ipgeolocation_sdk'
21
+
22
+ instance = IpgeolocationSdk::SecurityAPIXMLResponseArray.new(
23
+ ip: 8.8.8.8,
24
+ hostname: 195-154-221-54.rev.poneytelecom.eu,
25
+ security: null,
26
+ location: null,
27
+ network: null,
28
+ time_zone: null,
29
+ user_agent: null,
30
+ country_metadata: null,
31
+ currency: null
32
+ )
33
+ ```
34
+