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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +2124 -0
- data/Rakefile +10 -0
- data/docs/ASNConnection.md +22 -0
- data/docs/ASNDetails.md +48 -0
- data/docs/ASNLookupApi.md +89 -0
- data/docs/ASNResponse.md +20 -0
- data/docs/ASNResponseXML.md +20 -0
- data/docs/ASNResponseXMLAsn.md +48 -0
- data/docs/Abuse.md +40 -0
- data/docs/AbuseContactApi.md +85 -0
- data/docs/AbuseResponse.md +20 -0
- data/docs/AbuseResponseXML.md +20 -0
- data/docs/Astronomy.md +68 -0
- data/docs/AstronomyApi.md +97 -0
- data/docs/AstronomyEvening.md +36 -0
- data/docs/AstronomyLocation.md +50 -0
- data/docs/AstronomyMorning.md +36 -0
- data/docs/AstronomyResponse.md +22 -0
- data/docs/AstronomyXMLResponse.md +22 -0
- data/docs/BulkIPGeolocation.md +42 -0
- data/docs/BulkIPSecurity.md +42 -0
- data/docs/CountryMetadata.md +22 -0
- data/docs/Currency.md +22 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/ErrorXMLResponse.md +18 -0
- data/docs/ErrorXMLResponseArray.md +18 -0
- data/docs/GeolocationResponse.md +38 -0
- data/docs/GeolocationXMLResponse.md +38 -0
- data/docs/GeolocationXMLResponseArray.md +38 -0
- data/docs/GetBulkIpGeolocation200ResponseInner1.md +49 -0
- data/docs/GetBulkIpGeolocationRequest.md +18 -0
- data/docs/GetBulkIpSecurityInfo200ResponseInner1.md +49 -0
- data/docs/IPLocationApi.md +175 -0
- data/docs/Location.md +58 -0
- data/docs/LocationMinimal.md +52 -0
- data/docs/Network.md +22 -0
- data/docs/NetworkAsn.md +38 -0
- data/docs/NetworkCompany.md +22 -0
- data/docs/NetworkMinimal.md +20 -0
- data/docs/NetworkMinimalAsn.md +22 -0
- data/docs/NetworkMinimalCompany.md +18 -0
- data/docs/ParseBulkUserAgentStringsRequest.md +18 -0
- data/docs/ParseUserAgentStringRequest.md +18 -0
- data/docs/Security.md +38 -0
- data/docs/SecurityAPIResponse.md +34 -0
- data/docs/SecurityAPIXMLResponse.md +34 -0
- data/docs/SecurityAPIXMLResponseArray.md +34 -0
- data/docs/SecurityApi.md +175 -0
- data/docs/TimeConversionApi.md +109 -0
- data/docs/TimeConversionResponse.md +24 -0
- data/docs/TimeConversionXMLResponse.md +24 -0
- data/docs/TimeZone.md +36 -0
- data/docs/TimeZoneDetailedResponse.md +26 -0
- data/docs/TimeZoneDetailedXMLResponse.md +26 -0
- data/docs/TimeZoneDstEnd.md +28 -0
- data/docs/TimeZoneDstStart.md +28 -0
- data/docs/TimezoneAirport.md +40 -0
- data/docs/TimezoneApi.md +99 -0
- data/docs/TimezoneDetail.md +56 -0
- data/docs/TimezoneDetailDstEnd.md +28 -0
- data/docs/TimezoneDetailDstStart.md +28 -0
- data/docs/TimezoneLocation.md +48 -0
- data/docs/TimezoneLocode.md +32 -0
- data/docs/UserAgentApi.md +235 -0
- data/docs/UserAgentData.md +32 -0
- data/docs/UserAgentDataDevice.md +24 -0
- data/docs/UserAgentDataEngine.md +24 -0
- data/docs/UserAgentDataOperatingSystem.md +26 -0
- data/docs/UserAgentXMLData.md +32 -0
- data/docs/UserAgentXMLDataArray.md +32 -0
- data/git_push.sh +57 -0
- data/ipgeolocation_sdk.gemspec +29 -0
- data/lib/ipgeolocation_sdk/api/abuse_contact_api.rb +86 -0
- data/lib/ipgeolocation_sdk/api/asn_lookup_api.rb +92 -0
- data/lib/ipgeolocation_sdk/api/astronomy_api.rb +116 -0
- data/lib/ipgeolocation_sdk/api/ip_geolocation_api.rb +186 -0
- data/lib/ipgeolocation_sdk/api/ip_security_api.rb +184 -0
- data/lib/ipgeolocation_sdk/api/time_conversion_api.rb +122 -0
- data/lib/ipgeolocation_sdk/api/timezone_api.rb +113 -0
- data/lib/ipgeolocation_sdk/api/user_agent_api.rb +158 -0
- data/lib/ipgeolocation_sdk/api_client.rb +393 -0
- data/lib/ipgeolocation_sdk/api_error.rb +58 -0
- data/lib/ipgeolocation_sdk/configuration.rb +308 -0
- data/lib/ipgeolocation_sdk/models/abuse.rb +305 -0
- data/lib/ipgeolocation_sdk/models/abuse_response.rb +229 -0
- data/lib/ipgeolocation_sdk/models/abuse_response_xml.rb +229 -0
- data/lib/ipgeolocation_sdk/models/asn_connection.rb +238 -0
- data/lib/ipgeolocation_sdk/models/asn_response.rb +230 -0
- data/lib/ipgeolocation_sdk/models/asn_response_asn.rb +368 -0
- data/lib/ipgeolocation_sdk/models/asn_response_xml.rb +229 -0
- data/lib/ipgeolocation_sdk/models/asn_response_xml_asn.rb +364 -0
- data/lib/ipgeolocation_sdk/models/astronomy.rb +445 -0
- data/lib/ipgeolocation_sdk/models/astronomy_evening.rb +301 -0
- data/lib/ipgeolocation_sdk/models/astronomy_location.rb +364 -0
- data/lib/ipgeolocation_sdk/models/astronomy_morning.rb +301 -0
- data/lib/ipgeolocation_sdk/models/astronomy_response.rb +238 -0
- data/lib/ipgeolocation_sdk/models/astronomy_xml_response.rb +238 -0
- data/lib/ipgeolocation_sdk/models/bulk_ip_geolocation.rb +113 -0
- data/lib/ipgeolocation_sdk/models/bulk_ip_security.rb +113 -0
- data/lib/ipgeolocation_sdk/models/country_metadata.rb +240 -0
- data/lib/ipgeolocation_sdk/models/currency.rb +238 -0
- data/lib/ipgeolocation_sdk/models/error_response.rb +220 -0
- data/lib/ipgeolocation_sdk/models/error_xml_response.rb +220 -0
- data/lib/ipgeolocation_sdk/models/error_xml_response_array.rb +220 -0
- data/lib/ipgeolocation_sdk/models/geolocation_response.rb +310 -0
- data/lib/ipgeolocation_sdk/models/geolocation_xml_response.rb +310 -0
- data/lib/ipgeolocation_sdk/models/geolocation_xml_response_array.rb +310 -0
- data/lib/ipgeolocation_sdk/models/get_bulk_ip_geolocation200_response_inner1.rb +105 -0
- data/lib/ipgeolocation_sdk/models/get_bulk_ip_geolocation_request.rb +241 -0
- data/lib/ipgeolocation_sdk/models/get_bulk_ip_security_info200_response_inner1.rb +105 -0
- data/lib/ipgeolocation_sdk/models/location.rb +400 -0
- data/lib/ipgeolocation_sdk/models/location_minimal.rb +373 -0
- data/lib/ipgeolocation_sdk/models/network.rb +238 -0
- data/lib/ipgeolocation_sdk/models/network_asn.rb +310 -0
- data/lib/ipgeolocation_sdk/models/network_company.rb +238 -0
- data/lib/ipgeolocation_sdk/models/network_minimal.rb +229 -0
- data/lib/ipgeolocation_sdk/models/network_minimal_asn.rb +238 -0
- data/lib/ipgeolocation_sdk/models/network_minimal_company.rb +220 -0
- data/lib/ipgeolocation_sdk/models/parse_bulk_user_agent_strings_request.rb +222 -0
- data/lib/ipgeolocation_sdk/models/parse_user_agent_string_request.rb +220 -0
- data/lib/ipgeolocation_sdk/models/security.rb +310 -0
- data/lib/ipgeolocation_sdk/models/security_api_response.rb +292 -0
- data/lib/ipgeolocation_sdk/models/security_apixml_response.rb +292 -0
- data/lib/ipgeolocation_sdk/models/security_apixml_response_array.rb +292 -0
- data/lib/ipgeolocation_sdk/models/time_conversion_response.rb +247 -0
- data/lib/ipgeolocation_sdk/models/time_conversion_xml_response.rb +247 -0
- data/lib/ipgeolocation_sdk/models/time_zone.rb +301 -0
- data/lib/ipgeolocation_sdk/models/time_zone_detailed_response.rb +256 -0
- data/lib/ipgeolocation_sdk/models/time_zone_detailed_xml_response.rb +256 -0
- data/lib/ipgeolocation_sdk/models/time_zone_dst_end.rb +265 -0
- data/lib/ipgeolocation_sdk/models/time_zone_dst_start.rb +265 -0
- data/lib/ipgeolocation_sdk/models/timezone_airport.rb +319 -0
- data/lib/ipgeolocation_sdk/models/timezone_detail.rb +391 -0
- data/lib/ipgeolocation_sdk/models/timezone_detail_dst_end.rb +265 -0
- data/lib/ipgeolocation_sdk/models/timezone_detail_dst_start.rb +265 -0
- data/lib/ipgeolocation_sdk/models/timezone_location.rb +355 -0
- data/lib/ipgeolocation_sdk/models/timezone_locode.rb +283 -0
- data/lib/ipgeolocation_sdk/models/user_agent_data.rb +283 -0
- data/lib/ipgeolocation_sdk/models/user_agent_data_device.rb +247 -0
- data/lib/ipgeolocation_sdk/models/user_agent_data_engine.rb +247 -0
- data/lib/ipgeolocation_sdk/models/user_agent_data_operating_system.rb +256 -0
- data/lib/ipgeolocation_sdk/models/user_agent_xml_data.rb +283 -0
- data/lib/ipgeolocation_sdk/models/user_agent_xml_data_array.rb +283 -0
- data/lib/ipgeolocation_sdk/version.rb +15 -0
- data/lib/ipgeolocation_sdk.rb +107 -0
- data/spec/api/abuse_contact_api_spec.rb +48 -0
- data/spec/api/asn_lookup_api_spec.rb +50 -0
- data/spec/api/astronomy_api_spec.rb +54 -0
- data/spec/api/ip_location_api_spec.rb +67 -0
- data/spec/api/security_api_spec.rb +67 -0
- data/spec/api/time_conversion_api_spec.rb +60 -0
- data/spec/api/timezone_api_spec.rb +56 -0
- data/spec/api/user_agent_api_spec.rb +74 -0
- data/spec/models/abuse_response_spec.rb +42 -0
- data/spec/models/abuse_response_xml_spec.rb +42 -0
- data/spec/models/abuse_spec.rb +90 -0
- data/spec/models/asn_connection_spec.rb +48 -0
- data/spec/models/asn_response_asn_spec.rb +126 -0
- data/spec/models/asn_response_spec.rb +42 -0
- data/spec/models/asn_response_xml_asn_spec.rb +126 -0
- data/spec/models/asn_response_xml_spec.rb +42 -0
- data/spec/models/astronomy_evening_spec.rb +90 -0
- data/spec/models/astronomy_location_spec.rb +132 -0
- data/spec/models/astronomy_morning_spec.rb +90 -0
- data/spec/models/astronomy_response_spec.rb +48 -0
- data/spec/models/astronomy_spec.rb +186 -0
- data/spec/models/astronomy_xml_response_spec.rb +48 -0
- data/spec/models/country_metadata_spec.rb +48 -0
- data/spec/models/currency_spec.rb +48 -0
- data/spec/models/error_response_spec.rb +36 -0
- data/spec/models/error_xml_response_array_spec.rb +36 -0
- data/spec/models/error_xml_response_spec.rb +36 -0
- data/spec/models/geolocation_response_spec.rb +96 -0
- data/spec/models/geolocation_xml_response_array_spec.rb +96 -0
- data/spec/models/geolocation_xml_response_spec.rb +96 -0
- data/spec/models/get_bulk_ip_geolocation200_response_inner1_spec.rb +32 -0
- data/spec/models/get_bulk_ip_geolocation200_response_inner_spec.rb +32 -0
- data/spec/models/get_bulk_ip_geolocation_request_spec.rb +36 -0
- data/spec/models/get_bulk_ip_security_info200_response_inner1_spec.rb +32 -0
- data/spec/models/get_bulk_ip_security_info200_response_inner_spec.rb +32 -0
- data/spec/models/location_minimal_spec.rb +138 -0
- data/spec/models/location_spec.rb +156 -0
- data/spec/models/network_asn_spec.rb +96 -0
- data/spec/models/network_company_spec.rb +48 -0
- data/spec/models/network_minimal_asn_spec.rb +48 -0
- data/spec/models/network_minimal_company_spec.rb +36 -0
- data/spec/models/network_minimal_spec.rb +42 -0
- data/spec/models/network_spec.rb +48 -0
- data/spec/models/parse_bulk_user_agent_strings_request_spec.rb +36 -0
- data/spec/models/parse_user_agent_string_request_spec.rb +36 -0
- data/spec/models/security_api_response_spec.rb +84 -0
- data/spec/models/security_apixml_response_array_spec.rb +84 -0
- data/spec/models/security_apixml_response_spec.rb +84 -0
- data/spec/models/security_spec.rb +96 -0
- data/spec/models/time_conversion_response_spec.rb +54 -0
- data/spec/models/time_conversion_xml_response_spec.rb +54 -0
- data/spec/models/time_zone_detailed_response_spec.rb +60 -0
- data/spec/models/time_zone_detailed_xml_response_spec.rb +60 -0
- data/spec/models/time_zone_dst_end_spec.rb +66 -0
- data/spec/models/time_zone_dst_start_spec.rb +66 -0
- data/spec/models/time_zone_spec.rb +90 -0
- data/spec/models/timezone_airport_spec.rb +102 -0
- data/spec/models/timezone_detail_dst_end_spec.rb +66 -0
- data/spec/models/timezone_detail_dst_start_spec.rb +66 -0
- data/spec/models/timezone_detail_spec.rb +150 -0
- data/spec/models/timezone_location_spec.rb +126 -0
- data/spec/models/timezone_locode_spec.rb +78 -0
- data/spec/models/user_agent_data_device_spec.rb +54 -0
- data/spec/models/user_agent_data_engine_spec.rb +54 -0
- data/spec/models/user_agent_data_operating_system_spec.rb +60 -0
- data/spec/models/user_agent_data_spec.rb +78 -0
- data/spec/models/user_agent_xml_data_array_spec.rb +78 -0
- data/spec/models/user_agent_xml_data_spec.rb +78 -0
- data/spec/spec_helper.rb +111 -0
- metadata +373 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# IpgeolocationSdk::TimezoneDetailDstEnd
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **utc_time** | **String** | | [optional] |
|
8
|
+
| **duration** | **String** | | [optional] |
|
9
|
+
| **gap** | **Boolean** | | [optional] |
|
10
|
+
| **date_time_after** | **String** | | [optional] |
|
11
|
+
| **date_time_before** | **String** | | [optional] |
|
12
|
+
| **overlap** | **Boolean** | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'ipgeolocation_sdk'
|
18
|
+
|
19
|
+
instance = IpgeolocationSdk::TimezoneDetailDstEnd.new(
|
20
|
+
utc_time: 2025-11-02 TIME 09,
|
21
|
+
duration: -1H,
|
22
|
+
gap: null,
|
23
|
+
date_time_after: 2025-11-02 TIME 01,
|
24
|
+
date_time_before: 2025-11-02 TIME 02,
|
25
|
+
overlap: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# IpgeolocationSdk::TimezoneDetailDstStart
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **utc_time** | **String** | | [optional] |
|
8
|
+
| **duration** | **String** | | [optional] |
|
9
|
+
| **gap** | **Boolean** | | [optional] |
|
10
|
+
| **date_time_after** | **String** | | [optional] |
|
11
|
+
| **date_time_before** | **String** | | [optional] |
|
12
|
+
| **overlap** | **Boolean** | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'ipgeolocation_sdk'
|
18
|
+
|
19
|
+
instance = IpgeolocationSdk::TimezoneDetailDstStart.new(
|
20
|
+
utc_time: 2025-03-09 TIME 10,
|
21
|
+
duration: +1H,
|
22
|
+
gap: null,
|
23
|
+
date_time_after: 2025-03-09 TIME 03,
|
24
|
+
date_time_before: 2025-03-09 TIME 02,
|
25
|
+
overlap: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# IpgeolocationSdk::TimezoneLocation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **location_string** | **String** | | [optional] |
|
8
|
+
| **continent_code** | **String** | | [optional] |
|
9
|
+
| **continent_name** | **String** | | [optional] |
|
10
|
+
| **country_code2** | **String** | | [optional] |
|
11
|
+
| **country_code3** | **String** | | [optional] |
|
12
|
+
| **country_name** | **String** | | [optional] |
|
13
|
+
| **country_name_official** | **String** | | [optional] |
|
14
|
+
| **is_eu** | **Boolean** | | [optional] |
|
15
|
+
| **state_prov** | **String** | | [optional] |
|
16
|
+
| **state_code** | **String** | | [optional] |
|
17
|
+
| **district** | **String** | | [optional] |
|
18
|
+
| **city** | **String** | | [optional] |
|
19
|
+
| **locality** | **String** | | [optional] |
|
20
|
+
| **zipcode** | **String** | | [optional] |
|
21
|
+
| **latitude** | **String** | | [optional] |
|
22
|
+
| **longitude** | **String** | | [optional] |
|
23
|
+
|
24
|
+
## Example
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'ipgeolocation_sdk'
|
28
|
+
|
29
|
+
instance = IpgeolocationSdk::TimezoneLocation.new(
|
30
|
+
location_string: Londong, UK,
|
31
|
+
continent_code: OC,
|
32
|
+
continent_name: Oceania,
|
33
|
+
country_code2: AU,
|
34
|
+
country_code3: AUS,
|
35
|
+
country_name: Australia,
|
36
|
+
country_name_official: Commonwealth of Australia,
|
37
|
+
is_eu: false,
|
38
|
+
state_prov: Queensland,
|
39
|
+
state_code: AU-QLD,
|
40
|
+
district: South Brisbane,
|
41
|
+
city: Brisbane,
|
42
|
+
locality: ,
|
43
|
+
zipcode: 4101,
|
44
|
+
latitude: -27.47306,
|
45
|
+
longitude: 153.01421
|
46
|
+
)
|
47
|
+
```
|
48
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# IpgeolocationSdk::TimezoneLocode
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **lo_code** | **String** | | [optional] |
|
8
|
+
| **city** | **String** | | [optional] |
|
9
|
+
| **state_code** | **String** | | [optional] |
|
10
|
+
| **country_code** | **String** | | [optional] |
|
11
|
+
| **country_name** | **String** | | [optional] |
|
12
|
+
| **location_type** | **String** | | [optional] |
|
13
|
+
| **latitude** | **String** | | [optional] |
|
14
|
+
| **longitude** | **String** | | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'ipgeolocation_sdk'
|
20
|
+
|
21
|
+
instance = IpgeolocationSdk::TimezoneLocode.new(
|
22
|
+
lo_code: DEBER,
|
23
|
+
city: Berlin,
|
24
|
+
state_code: BE,
|
25
|
+
country_code: DE,
|
26
|
+
country_name: ,
|
27
|
+
location_type: Port, Rail Terminal, Road Terminal, Airport, Postal Exchange,
|
28
|
+
latitude: 52.51667,
|
29
|
+
longitude: 13.38333
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,235 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ipgeolocation.io/v2*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_user_agent_details**](UserAgentApi.md#get_user_agent_details) | **GET** /user-agent | Get details of user-agent |
|
8
|
+
| [**parse_bulk_user_agent_strings**](UserAgentApi.md#parse_bulk_user_agent_strings) | **POST** /user-agent-bulk | Handle multiple user-agent string lookups |
|
9
|
+
| [**parse_user_agent_string**](UserAgentApi.md#parse_user_agent_string) | **POST** /user-agent | Handle single User-Agent string |
|
10
|
+
|
11
|
+
|
12
|
+
## get_user_agent_details
|
13
|
+
|
14
|
+
> <UserAgentData> get_user_agent_details(opts)
|
15
|
+
|
16
|
+
Get details of user-agent
|
17
|
+
|
18
|
+
User Agent Parser API provides the accurate browser, device, and operating system details from a User Agent String. It also provides information about crawlers and attack sources. You can use these details to customize user experience, prevent crawlers and attackers from accessing your website.
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'ipgeolocation_sdk'
|
25
|
+
# setup authorization
|
26
|
+
IpgeolocationSdk.configure do |config|
|
27
|
+
# Configure API key authorization: ApiKeyAuth
|
28
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
30
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = IpgeolocationSdk::UserAgentApi.new
|
34
|
+
opts = {
|
35
|
+
user_agent: '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', # String |
|
36
|
+
output: 'json' # String | Desired output format (json or xml).
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
# Get details of user-agent
|
41
|
+
result = api_instance.get_user_agent_details(opts)
|
42
|
+
p result
|
43
|
+
rescue IpgeolocationSdk::ApiError => e
|
44
|
+
puts "Error when calling UserAgentApi->get_user_agent_details: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
#### Using the get_user_agent_details_with_http_info variant
|
49
|
+
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
51
|
+
|
52
|
+
> <Array(<UserAgentData>, Integer, Hash)> get_user_agent_details_with_http_info(opts)
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
begin
|
56
|
+
# Get details of user-agent
|
57
|
+
data, status_code, headers = api_instance.get_user_agent_details_with_http_info(opts)
|
58
|
+
p status_code # => 2xx
|
59
|
+
p headers # => { ... }
|
60
|
+
p data # => <UserAgentData>
|
61
|
+
rescue IpgeolocationSdk::ApiError => e
|
62
|
+
puts "Error when calling UserAgentApi->get_user_agent_details_with_http_info: #{e}"
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
67
|
+
|
68
|
+
| Name | Type | Description | Notes |
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
70
|
+
| **user_agent** | **String** | | [optional] |
|
71
|
+
| **output** | **String** | Desired output format (json or xml). | [optional] |
|
72
|
+
|
73
|
+
### Return type
|
74
|
+
|
75
|
+
[**UserAgentData**](UserAgentData.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
|
+
|
86
|
+
|
87
|
+
## parse_bulk_user_agent_strings
|
88
|
+
|
89
|
+
> <Array<UserAgentData>> parse_bulk_user_agent_strings(opts)
|
90
|
+
|
91
|
+
Handle multiple user-agent string lookups
|
92
|
+
|
93
|
+
This endpoint allows you to perform the parsing of multiple User-Angent strings (max. 50,000) at the same time. The requests count per round is equal to total User-Agent strings passed. This feature is `only available for paid plans`.
|
94
|
+
|
95
|
+
### Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'time'
|
99
|
+
require 'ipgeolocation_sdk'
|
100
|
+
# setup authorization
|
101
|
+
IpgeolocationSdk.configure do |config|
|
102
|
+
# Configure API key authorization: ApiKeyAuth
|
103
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
104
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
105
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
106
|
+
end
|
107
|
+
|
108
|
+
api_instance = IpgeolocationSdk::UserAgentApi.new
|
109
|
+
opts = {
|
110
|
+
output: 'json', # String | Desired output format (json or xml).
|
111
|
+
parse_bulk_user_agent_strings_request: IpgeolocationSdk::ParseBulkUserAgentStringsRequest.new # ParseBulkUserAgentStringsRequest |
|
112
|
+
}
|
113
|
+
|
114
|
+
begin
|
115
|
+
# Handle multiple user-agent string lookups
|
116
|
+
result = api_instance.parse_bulk_user_agent_strings(opts)
|
117
|
+
p result
|
118
|
+
rescue IpgeolocationSdk::ApiError => e
|
119
|
+
puts "Error when calling UserAgentApi->parse_bulk_user_agent_strings: #{e}"
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
#### Using the parse_bulk_user_agent_strings_with_http_info variant
|
124
|
+
|
125
|
+
This returns an Array which contains the response data, status code and headers.
|
126
|
+
|
127
|
+
> <Array(<Array<UserAgentData>>, Integer, Hash)> parse_bulk_user_agent_strings_with_http_info(opts)
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
begin
|
131
|
+
# Handle multiple user-agent string lookups
|
132
|
+
data, status_code, headers = api_instance.parse_bulk_user_agent_strings_with_http_info(opts)
|
133
|
+
p status_code # => 2xx
|
134
|
+
p headers # => { ... }
|
135
|
+
p data # => <Array<UserAgentData>>
|
136
|
+
rescue IpgeolocationSdk::ApiError => e
|
137
|
+
puts "Error when calling UserAgentApi->parse_bulk_user_agent_strings_with_http_info: #{e}"
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
### Parameters
|
142
|
+
|
143
|
+
| Name | Type | Description | Notes |
|
144
|
+
| ---- | ---- | ----------- | ----- |
|
145
|
+
| **output** | **String** | Desired output format (json or xml). | [optional] |
|
146
|
+
| **parse_bulk_user_agent_strings_request** | [**ParseBulkUserAgentStringsRequest**](ParseBulkUserAgentStringsRequest.md) | | [optional] |
|
147
|
+
|
148
|
+
### Return type
|
149
|
+
|
150
|
+
[**Array<UserAgentData>**](UserAgentData.md)
|
151
|
+
|
152
|
+
### Authorization
|
153
|
+
|
154
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
155
|
+
|
156
|
+
### HTTP request headers
|
157
|
+
|
158
|
+
- **Content-Type**: application/json
|
159
|
+
- **Accept**: application/json, application/xml
|
160
|
+
|
161
|
+
|
162
|
+
## parse_user_agent_string
|
163
|
+
|
164
|
+
> <UserAgentData> parse_user_agent_string(opts)
|
165
|
+
|
166
|
+
Handle single User-Agent string
|
167
|
+
|
168
|
+
You can also provide custom User-Agent string to parse in JSON payload. This endpoint is meant to be called from server-side and is available for paid subscriptions only.
|
169
|
+
|
170
|
+
### Examples
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
require 'time'
|
174
|
+
require 'ipgeolocation_sdk'
|
175
|
+
# setup authorization
|
176
|
+
IpgeolocationSdk.configure do |config|
|
177
|
+
# Configure API key authorization: ApiKeyAuth
|
178
|
+
config.api_key['apiKey'] = 'YOUR API KEY'
|
179
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
180
|
+
# config.api_key_prefix['apiKey'] = 'Bearer'
|
181
|
+
end
|
182
|
+
|
183
|
+
api_instance = IpgeolocationSdk::UserAgentApi.new
|
184
|
+
opts = {
|
185
|
+
output: 'json', # String | Desired output format (json or xml).
|
186
|
+
parse_user_agent_string_request: IpgeolocationSdk::ParseUserAgentStringRequest.new # ParseUserAgentStringRequest |
|
187
|
+
}
|
188
|
+
|
189
|
+
begin
|
190
|
+
# Handle single User-Agent string
|
191
|
+
result = api_instance.parse_user_agent_string(opts)
|
192
|
+
p result
|
193
|
+
rescue IpgeolocationSdk::ApiError => e
|
194
|
+
puts "Error when calling UserAgentApi->parse_user_agent_string: #{e}"
|
195
|
+
end
|
196
|
+
```
|
197
|
+
|
198
|
+
#### Using the parse_user_agent_string_with_http_info variant
|
199
|
+
|
200
|
+
This returns an Array which contains the response data, status code and headers.
|
201
|
+
|
202
|
+
> <Array(<UserAgentData>, Integer, Hash)> parse_user_agent_string_with_http_info(opts)
|
203
|
+
|
204
|
+
```ruby
|
205
|
+
begin
|
206
|
+
# Handle single User-Agent string
|
207
|
+
data, status_code, headers = api_instance.parse_user_agent_string_with_http_info(opts)
|
208
|
+
p status_code # => 2xx
|
209
|
+
p headers # => { ... }
|
210
|
+
p data # => <UserAgentData>
|
211
|
+
rescue IpgeolocationSdk::ApiError => e
|
212
|
+
puts "Error when calling UserAgentApi->parse_user_agent_string_with_http_info: #{e}"
|
213
|
+
end
|
214
|
+
```
|
215
|
+
|
216
|
+
### Parameters
|
217
|
+
|
218
|
+
| Name | Type | Description | Notes |
|
219
|
+
| ---- | ---- | ----------- | ----- |
|
220
|
+
| **output** | **String** | Desired output format (json or xml). | [optional] |
|
221
|
+
| **parse_user_agent_string_request** | [**ParseUserAgentStringRequest**](ParseUserAgentStringRequest.md) | | [optional] |
|
222
|
+
|
223
|
+
### Return type
|
224
|
+
|
225
|
+
[**UserAgentData**](UserAgentData.md)
|
226
|
+
|
227
|
+
### Authorization
|
228
|
+
|
229
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
230
|
+
|
231
|
+
### HTTP request headers
|
232
|
+
|
233
|
+
- **Content-Type**: application/json
|
234
|
+
- **Accept**: application/json, application/xml
|
235
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **user_agent_string** | **String** | | [optional] |
|
8
|
+
| **name** | **String** | | [optional] |
|
9
|
+
| **type** | **String** | | [optional] |
|
10
|
+
| **version** | **String** | | [optional] |
|
11
|
+
| **version_major** | **String** | | [optional] |
|
12
|
+
| **device** | [**UserAgentDataDevice**](UserAgentDataDevice.md) | | [optional] |
|
13
|
+
| **engine** | [**UserAgentDataEngine**](UserAgentDataEngine.md) | | [optional] |
|
14
|
+
| **operating_system** | [**UserAgentDataOperatingSystem**](UserAgentDataOperatingSystem.md) | | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'ipgeolocation_sdk'
|
20
|
+
|
21
|
+
instance = IpgeolocationSdk::UserAgentData.new(
|
22
|
+
user_agent_string: null,
|
23
|
+
name: null,
|
24
|
+
type: null,
|
25
|
+
version: null,
|
26
|
+
version_major: null,
|
27
|
+
device: null,
|
28
|
+
engine: null,
|
29
|
+
operating_system: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentDataDevice
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **type** | **String** | | [optional] |
|
9
|
+
| **brand** | **String** | | [optional] |
|
10
|
+
| **cpu** | **String** | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'ipgeolocation_sdk'
|
16
|
+
|
17
|
+
instance = IpgeolocationSdk::UserAgentDataDevice.new(
|
18
|
+
name: null,
|
19
|
+
type: null,
|
20
|
+
brand: null,
|
21
|
+
cpu: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentDataEngine
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **type** | **String** | | [optional] |
|
9
|
+
| **version** | **String** | | [optional] |
|
10
|
+
| **version_major** | **String** | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'ipgeolocation_sdk'
|
16
|
+
|
17
|
+
instance = IpgeolocationSdk::UserAgentDataEngine.new(
|
18
|
+
name: null,
|
19
|
+
type: null,
|
20
|
+
version: null,
|
21
|
+
version_major: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentDataOperatingSystem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **type** | **String** | | [optional] |
|
9
|
+
| **version** | **String** | | [optional] |
|
10
|
+
| **version_major** | **String** | | [optional] |
|
11
|
+
| **build** | **String** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ipgeolocation_sdk'
|
17
|
+
|
18
|
+
instance = IpgeolocationSdk::UserAgentDataOperatingSystem.new(
|
19
|
+
name: null,
|
20
|
+
type: null,
|
21
|
+
version: null,
|
22
|
+
version_major: null,
|
23
|
+
build: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentXMLData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **user_agent_string** | **String** | | [optional] |
|
8
|
+
| **name** | **String** | | [optional] |
|
9
|
+
| **type** | **String** | | [optional] |
|
10
|
+
| **version** | **String** | | [optional] |
|
11
|
+
| **version_major** | **String** | | [optional] |
|
12
|
+
| **device** | [**UserAgentDataDevice**](UserAgentDataDevice.md) | | [optional] |
|
13
|
+
| **engine** | [**UserAgentDataEngine**](UserAgentDataEngine.md) | | [optional] |
|
14
|
+
| **operating_system** | [**UserAgentDataOperatingSystem**](UserAgentDataOperatingSystem.md) | | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'ipgeolocation_sdk'
|
20
|
+
|
21
|
+
instance = IpgeolocationSdk::UserAgentXMLData.new(
|
22
|
+
user_agent_string: null,
|
23
|
+
name: null,
|
24
|
+
type: null,
|
25
|
+
version: null,
|
26
|
+
version_major: null,
|
27
|
+
device: null,
|
28
|
+
engine: null,
|
29
|
+
operating_system: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# IpgeolocationSdk::UserAgentXMLDataArray
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **user_agent_string** | **String** | | [optional] |
|
8
|
+
| **name** | **String** | | [optional] |
|
9
|
+
| **type** | **String** | | [optional] |
|
10
|
+
| **version** | **String** | | [optional] |
|
11
|
+
| **version_major** | **String** | | [optional] |
|
12
|
+
| **device** | [**UserAgentDataDevice**](UserAgentDataDevice.md) | | [optional] |
|
13
|
+
| **engine** | [**UserAgentDataEngine**](UserAgentDataEngine.md) | | [optional] |
|
14
|
+
| **operating_system** | [**UserAgentDataOperatingSystem**](UserAgentDataOperatingSystem.md) | | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'ipgeolocation_sdk'
|
20
|
+
|
21
|
+
instance = IpgeolocationSdk::UserAgentXMLDataArray.new(
|
22
|
+
user_agent_string: null,
|
23
|
+
name: null,
|
24
|
+
type: null,
|
25
|
+
version: null,
|
26
|
+
version_major: null,
|
27
|
+
device: null,
|
28
|
+
engine: null,
|
29
|
+
operating_system: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=$(git remote)
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# ipgeolocation.gemspec
|
2
|
+
require_relative "lib/ipgeolocation_sdk/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "ipgeolocation_sdk"
|
6
|
+
s.version = IpgeolocationSdk::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["IPGeolocation.io"]
|
9
|
+
s.email = ["support@ipgeolocation.io"]
|
10
|
+
s.homepage = "https://ipgeolocation.io"
|
11
|
+
s.summary = "Official Ruby SDK for IPGeolocation.io APIs"
|
12
|
+
s.description = "A Ruby wrapper for the IPGeolocation.io API suite, providing geolocation, ip security, timezone, currency, user-agent, and other IP intelligence features. Easily integrate IP data into your Ruby applications."
|
13
|
+
s.license = "MIT"
|
14
|
+
s.required_ruby_version = ">= 2.7"
|
15
|
+
|
16
|
+
s.metadata = {
|
17
|
+
"homepage_uri" => s.homepage,
|
18
|
+
"source_code_uri" => "https://github.com/IPGeolocation/ip-geolocation-ruby-sdk",
|
19
|
+
"bug_tracker_uri" => "https://github.com/IPGeolocation/ip-geolocation-ruby-sdk/issues"
|
20
|
+
}
|
21
|
+
|
22
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
23
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
24
|
+
|
25
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
26
|
+
s.test_files = `find spec/*`.split("\n")
|
27
|
+
s.executables = []
|
28
|
+
s.require_paths = ["lib"]
|
29
|
+
end
|