Skip to content

Commit 6fdab08

Browse files
committed
Documentation update
1 parent a095ecb commit 6fdab08

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,37 @@ function handleResponse(response) {
4545
console.log(response);
4646
}
4747

48-
// Query geolocation for the calling machine's IP address with an API key (optional, if you're using "Request Origin" feature at IP Geolocation API)
48+
// Get geolocation for the calling machine's IP address with an API key (optional, if you're using "Request Origin" feature at IP Geolocation API)
4949
getGeolocation(handleResponse, "YOUR_API_KEY");
5050

51-
// To use the "Request Origin" feature at IP Geolocation API, you skip the API key parameter.
51+
// Don't pass the API key if you're using the "Request Origin" feature at IP Geolocation API
5252
getGeolocation(handleResponse);
5353

5454
// Toggle API calls' async behavior. By default, async is true.
5555
setAsync(false)
5656

57-
// Query geolocation for an IP address e.g., "1.1.1.1"
57+
// Get geolocation for an IP address "1.1.1.1"
5858
setIPAddressParameter("1.1.1.1");
5959
getGeolocation(handleResponse, "YOUR_API_KEY");
6060

61-
// Query only specific geolocation fields e.g., "country_code2,time_zone,currency" for the calling machine's IP address
61+
// Get geolocation for an IP address "1.1.1.1" in Russian language **
62+
setLanguageParameter("ru");
63+
setIPAddressParameter("1.1.1.1");
64+
getGeolocation(handleResponse, "YOUR_API_KEY");
65+
66+
// Get the specific geolocation fields "country_code2,time_zone,currency" for the calling machine's IP address
6267
setFieldsParameter("geo,time_zone,currency");
6368
getGeolocation(handleResponse, "YOUR_API_KEY");
6469

65-
// Query only specific fields like "country_code2,time_zone,currency" for an IP address like "1.1.1.1" and skip the "ip" field in the response
70+
// Get the specified geolocaiton fields like "country_code2,time_zone,currency" for an IP address "1.1.1.1" and skip the "ip" field in the response
6671
setFieldsParameter("geo,time_zone,currency");
6772
setIPAddressParameter("1.1.1.1");
6873
setExcludesParameter("ip");
6974
getGeolocation(handleResponse, "YOUR_API_KEY");
7075
```
7176
## Time Zone API
7277

73-
Here are a few different ways of querying Time Zone information from IP Geolocation API.
78+
Here are a few examples to query Time Zone information from Timezone API.
7479

7580
```javascript
7681
// Function to handle the response from IP Geolocation API.
@@ -79,24 +84,25 @@ function handleResponse(response) {
7984
console.log(response);
8085
}
8186

82-
// Query time zone information for the calling machine's IP address with an API key (optional, if you're using "Request Origin" feature at IP Geolocation API)
87+
// Get time zone information for the calling machine's IP address with an API key (optional, if you're using "Request Origin" feature at IP Geolocation API)
8388
getTimezone(handleResponse, "YOUR_API_KEY");
8489

85-
// To use the "Request Origin" feature at IP Geolocation API, you skip the API key parameter.
90+
// Don't pass the API key if you're using the "Request Origin" feature at IP Geolocation API
8691
getTimezone(handleResponse);
8792

8893
// Toggle API calls' async behavior. By default, async is true.
8994
setAsync(false)
9095

91-
// Query time zone information for an IP address e.g., "1.1.1.1"
96+
// Get time zone information for an IP address "1.1.1.1" and geolocation information in Italian language **
9297
setIPAddressParameter("1.1.1.1");
98+
setLanguageParameter("it");
9399
getTimezone(handleResponse, "YOUR_API_KEY");
94100

95-
// Query time zone infomration for a time zone ID like "America/New_York"
101+
// Get time zone infomration for a time zone "America/New_York"
96102
setTimezoneParameter("America/Los_Angeles");
97103
getTimezone(handleResponse, "YOUR_API_KEY");
98104

99-
// Query time zone information by latitude and longitude of the location
105+
// Get time zone information by coordinates of the location
100106
setCoordinatesParameter("31.4816", "74.3551");
101107
getTimezone(handleResponse, "YOUR_API_KEY");
102108
```
@@ -135,3 +141,14 @@ Here is a sample code to use IP Geolocation API using JQuery SDK:
135141
});
136142
</script>
137143
```
144+
145+
** IPGeolocation provides geolocation information in the following languages:
146+
* English (en)
147+
* German (de)
148+
* Russian (ru)
149+
* Japanese (ja)
150+
* French (fr)
151+
* Chinese Simplified (cn)
152+
* Spanish (es)
153+
* Czech (cs)
154+
* Italian (it)`

0 commit comments

Comments
 (0)