Skip to content

Commit 9adaf8d

Browse files
committed
added documentation for timezoneConvert and related methods/classes
also corrected minor mistakes in previous class's doc
1 parent 33f79df commit 9adaf8d

File tree

1 file changed

+59
-31
lines changed

1 file changed

+59
-31
lines changed

README.md

Lines changed: 59 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,21 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
453453

454454
### Class: io.ipgeolocation.api.IPGeolocationAPI
455455

456-
| Method | Description | Return Type |
457-
|:----------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
458-
| IPGeolocationAPI(String apiKey) throws IllegalArgumentException | Constructs the IPGeolocationAPI object. It takes a valid apiKey as a parameter and throws IllegalArgumentException if apiKey is empty or null. | |
459-
| getApiKey() | Return the API key that you set to query the IPGeolocation API. | String |
460-
| getGeolocation() | Query Geolocation API. | Geolocation |
461-
| getGeolocation(GeolocationParams params) | Query Geolocation API based on the parameters passed. | Geolocation |
462-
| getBulkGeolocation(String[] ips, GeolocationParams params) | Query Geolocation API to lookup multiple IP addresses (max. 50). | List<Geolocation> |
463-
| getTimezone() | Query Timezone API based on calling machine's IP address. | Timezone |
464-
| getTimezone(TimezoneParams params) | Query Timezone API based on the parameters passed. | Timezone |
465-
| getUserAgent(String uaString) | Query UserAgent API. | UserAgent |
466-
| getBulkUserAgent(String[] uaStrings) | Query UserAgent API to lookup multiple user-agent strings (max. 50). | List<UserAgent> |
456+
| Method | Description | Return Type |
457+
|:----------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
458+
| IPGeolocationAPI(String apiKey) throws IllegalArgumentException | Constructs the IPGeolocationAPI object. It takes a valid apiKey as a parameter and throws IllegalArgumentException if apiKey is empty or null. | |
459+
| getApiKey() | Return the API key that you set to query the IPGeolocation API. | String |
460+
| getGeolocation() | Query Geolocation API. | Geolocation |
461+
| getGeolocation(GeolocationParams params) | Query Geolocation API based on the parameters passed. | Geolocation |
462+
| getBulkGeolocation(String[] ips) | Query Geolocation API to lookup multiple IP addresses (max. 50). | List<Geolocation> |
463+
| getBulkGeolocation(String[] ips, GeolocationParams params) | Query Geolocation API to lookup multiple IP addresses (max. 50) based upon the parameters passed. | List<Geolocation> |
464+
| getTimezone() | Query Timezone API based on calling machine's IP address. | Timezone |
465+
| getTimezone(TimezoneParams params) | Query Timezone API based on the parameters passed. | Timezone |
466+
| convertTimeZone(TimezoneConvertParams params) | Convert between different timezones. | TimezoneConvert |
467+
| getUserAgent(String uaString) | Query UserAgent API. | UserAgent |
468+
| getBulkUserAgent(String[] uaStrings) | Query UserAgent API to lookup multiple user-agent strings (max. 50). | List<UserAgent> |
469+
| getAstronomy() | Query Astronomy API with default the parameters. | Astronomy |
470+
| getAstronomy(AstronomyParams params) | Query Astronomy API based upon the parameters passed. | Astronomy |
467471

468472
### Class: io.ipgeolocation.api.GeolocationParams
469473

@@ -524,7 +528,7 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
524528
| getConnectionType() | Returns connection type of the IP address. | String |
525529
| getOrganization() | Returns organization of the IP address. | String |
526530
| getAsn() | Returns AS number of the IP address. | String |
527-
| getGeoNameId() | Returns geoname ID from geonames.org database. | String |
531+
| getGeoNameId() | Returns Geo Name ID from geonames.org database. | String |
528532
| getCurrency() | Returns currency information of the country. | GeolocationCurrency |
529533
| getTimezone() | Returns time zone information of the country. | GeolocationTimezone |
530534
| getGeolocationSecurity() | Returns security details of the ip address. | GeolocationSecurity |
@@ -540,14 +544,15 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
540544

541545
### Class: io.ipgeolocation.api.GeolocationTimezone
542546

543-
| Method | Description | Return Type |
544-
|:---------------------|:-------------------------------------------------------------------------------|:------------|
545-
| getName() | Returns standard time zone ID like "America/New_York". | String |
546-
| getOffset() | Returns time zone offset from UTC. | int |
547-
| getCurrentTime() | Returns current date-time string in the format "yyyy-MM-dd HH:mm:ss.SSSZ" | String |
548-
| getCurrentTimeUnix() | Returns current date-time as a unix time | BigDecimal |
549-
| isDST() | Returns is the country observing daylight saving time. | Boolean |
550-
| getDSTSavings() | Returns daylight savings time (in hours). | int |
547+
| Method | Description | Return Type |
548+
|:---------------------|:--------------------------------------------------------------------------|:------------|
549+
| getName() | Returns standard time zone ID like "America/New_York". | String |
550+
| getOffset() | Returns time zone offset from UTC. | int |
551+
| getCurrentTime() | Returns current date-time string in the format "yyyy-MM-dd HH:mm:ss.SSSZ" | String |
552+
| getCurrentTimeUnix() | Returns current date-time as a unix time | BigDecimal |
553+
| isDST() | Returns is the country observing daylight saving time. | Boolean |
554+
| getDSTSavings() | Returns daylight savings time (in hours). | int |
555+
| getOffsetWithDst() | Returns daylight savings time offset with UTC (in hours). | int |
551556

552557
### Class: io.ipgeolocation.api.GeolocationSecurity
553558

@@ -579,8 +584,8 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
579584

580585
| Method | Description | Return Type |
581586
|:-----------------------------------------------------------|:--------------------------------------------------------------------------|:----------------------|
582-
| withTimezone(String timezone) | Sets time zone ID to query time zone information. | TimezoneParamsBuilder |
583-
| withIPAddress(String ip) | Sets IP address to query time zone information. | TimezoneParamsBuilder |
587+
| withTimezone(String timeZone) | Sets time zone ID to query time zone information. | TimezoneParamsBuilder |
588+
| withIPAddress(String ipAddress) | Sets IP address to query time zone information. | TimezoneParamsBuilder |
584589
| withCoordinates(BigDecimal latitude, BigDecimal longitude) | Sets latitude and longitude of a location to query time zone information. | TimezoneParamsBuilder |
585590
| withLocation(String location) | Set location parameter to get timezone details. | TimezoneParamsBuilder |
586591
| withLang(String lang) | Set language parameter to lookup geolocation. Default is 'en'. | TimezoneParamsBuilder |
@@ -607,7 +612,7 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
607612
| getYearAbbr() | Returns 2-letters year abbreviation like "18". | String |
608613
| isDST() | Returns is the country observing Daylight Saving time. | boolean |
609614
| getDSTSavings() | Returns daylight savings time (in hours). | int |
610-
| getTimezoneGeo() | Returns geolocation of timezone if you lookup timezone information from an IP address. | TimezoneGeo |
615+
| getGeo() | Returns geolocation of timezone if you lookup timezone information from an IP address. | TimezoneGeo |
611616

612617
### Class: io.ipgeolocation.api.TimezoneGeo
613618

@@ -676,14 +681,14 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
676681
| builder() | Returns an instance of AstronomyParamsBuilder class. | static AstronomyParamsBuilder |
677682

678683
### Class: io.ipgeolocation.api.AstronomyParams.AstronomyParamsBuilder
679-
| Method | Description | Return Type |
680-
|:------------------|:--------------------------------------------------------------------------|:-------------------------|
681-
| withLocation() | Sets location to query astronomy information. | AstronomyParamsBuilder |
682-
| withCoordinates() | Sets latitude and longitude of a location to query astronomy information. | AstronomyParamsBuilder |
683-
| withIPAddress() | Sets IP address of which to query astronomy information. | AstronomyParamsBuilder |
684-
| withDate() | Sets date of which to query astronomy information. | AstronomyParamsBuilder |
685-
| withLang() | Sets language in which to query information. | AstronomyParamsBuilder |
686-
| build() | Returns an instance of AstronomyParams with the above specified value(s). | AstronomyParamsBuilder |
684+
| Method | Description | Return Type |
685+
|:-----------------------------------------------------------|:--------------------------------------------------------------------------|:-----------------------|
686+
| withLocation(String location) | Sets location to query astronomy information. | AstronomyParamsBuilder |
687+
| withCoordinates(BigDecimal latitude, BigDecimal longitude) | Sets latitude and longitude of a location to query astronomy information. | AstronomyParamsBuilder |
688+
| withIPAddress(String ipAddress) | Sets IP address of which to query astronomy information. | AstronomyParamsBuilder |
689+
| withDate(String date) | Sets date of which to query astronomy information. | AstronomyParamsBuilder |
690+
| withLang(String lang) | Sets language in which to query information. | AstronomyParamsBuilder |
691+
| build() | Returns an instance of AstronomyParams with the above specified value(s). | AstronomyParams |
687692

688693
### Class: io.ipgeolocation.api.Astronomy
689694
| Method | Description | Return Type |
@@ -725,3 +730,26 @@ IP Geolocation API Java SDK has the following classes that you can use to fully
725730
| getLocality() | Returns the locality of the queried astronomy information. | String |
726731
| getCity() | Returns the city of the queried astronomy information. | String |
727732
| toString() | Returns the fetched JSON from the API in the formatted way. | String |
733+
734+
### Class: io.ipgeolocation.api.TimezoneConvertParams
735+
| Method | Description | Return Type |
736+
|:-------------------|:----------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------|
737+
| getTimezoneFrom() | Returns the source [timezone ID](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for which conversion would be performed. | String |
738+
| getTimezoneTo() | Returns the target timezone ID for which conversion would be performed. | String |
739+
| getTime() | Returns the dateTime which would be used for conversion. | String |
740+
| getLatitudeFrom() | Returns the source latitude for which conversion would be performed. | BigDecimal |
741+
| getLongitudeFrom() | Returns the source longitude for which conversion would be performed. | BigDecimal |
742+
| getLatitudeTo() | Returns the target latitude for which conversion would be performed. | BigDecimal |
743+
| getLongitudeTo() | Returns the target longitude for which conversion would be performed. | BigDecimal |
744+
| getLocationFrom() | Returns the source location (i.e., city, country) for which conversion would be performed. | String |
745+
| getLocationTo() | Returns the target location (i.e., city, country) for which conversion would be performed. | String |
746+
| builder() | Returns an instance of TimezoneConvertParamsBuilder class to create TimezoneConvertParams object with custom parameters. | static TimezoneConvertParams |
747+
748+
### Class: io.ipgeolocation.api.TimezoneConvertParams.TimezoneConvertParamsBuilder
749+
| Method | Description | Return Type |
750+
|:----------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|:-----------------------------|
751+
| withTimeZone(String timezoneFrom, String timezoneTo) | Sets source and target [timezone IDs](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to perform conversion. | TimezoneConvertParamsBuilder |
752+
| withDateTime(String dateTime) | Sets dateTime which would be used for conversion. | TimezoneConvertParamsBuilder |
753+
| withCoordinates(BigDecimal latFrom, BigDecimal longFrom, BigDecimal latTo, BigDecimal longTo) | Sets the source and target geo coordinates. | TimezoneConvertParamsBuilder |
754+
| withLocation(String locationFrom, String locationTo) | Sets the source and target locations (i.e., city, country). | TimezoneConvertParamsBuilder |
755+
| build() | Returns an instance of the TimezoneConvertParams with the above specified value(s). | TimezoneConvertParams |

0 commit comments

Comments
 (0)