You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,29 +40,29 @@ Here are a few different ways of querying Geolocation for an IP address from IP
40
40
41
41
```javascript
42
42
// Function to handle the response from IP Geolocation API.
43
-
//**response** is a JSON object returned from IP Geolocation API.
43
+
//"response" is a JSON object returned from IP Geolocation API.
44
44
functionhandleResponse(response) {
45
45
console.log(response);
46
46
}
47
47
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
+
// 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)
49
49
getGeolocation(handleResponse, "YOUR_API_KEY");
50
50
51
-
// To use the _Request Origin_ feature at IP Geolocation API, you skip the API key parameter.
51
+
// To use the "Request Origin" feature at IP Geolocation API, you skip the API key parameter.
52
52
getGeolocation(handleResponse);
53
53
54
54
// Toggle API calls' async behavior. By default, async is true.
55
55
setAsync(false)
56
56
57
-
// Query geolocation for an IP address e.g., '1.1.1.1'
57
+
// Query geolocation for an IP address e.g., "1.1.1.1"
58
58
setIPAddressParameter("1.1.1.1");
59
59
getGeolocation(handleResponse, "YOUR_API_KEY");
60
60
61
-
// Query only specific geolocation fields e.g., 'country_code2,time_zone,currency' for the calling machine's IP address
61
+
// Query only specific geolocation fields e.g., "country_code2,time_zone,currency" for the calling machine's IP address
62
62
setFieldsParameter("geo,time_zone,currency");
63
63
getGeolocation(handleResponse, "YOUR_API_KEY");
64
64
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
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
66
66
setFieldsParameter("geo,time_zone,currency");
67
67
setIPAddressParameter("1.1.1.1");
68
68
setExcludesParameter("ip");
@@ -74,25 +74,25 @@ Here are a few different ways of querying Time Zone information from IP Geolocat
74
74
75
75
```javascript
76
76
// Function to handle the response from IP Geolocation API.
77
-
//**response** is a JSON object returned from IP Geolocation API.
77
+
//"response" is a JSON object returned from IP Geolocation API.
78
78
functionhandleResponse(response) {
79
79
console.log(response);
80
80
}
81
81
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)
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)
83
83
getTimezone(handleResponse, "YOUR_API_KEY");
84
84
85
-
// To use the _Request Origin_ feature at IP Geolocation API, you skip the API key parameter.
85
+
// To use the "Request Origin" feature at IP Geolocation API, you skip the API key parameter.
86
86
getTimezone(handleResponse);
87
87
88
88
// Toggle API calls' async behavior. By default, async is true.
89
89
setAsync(false)
90
90
91
-
// Query time zone information for an IP address e.g., '1.1.1.1'
91
+
// Query time zone information for an IP address e.g., "1.1.1.1"
92
92
setIPAddressParameter("1.1.1.1");
93
93
getTimezone(handleResponse, "YOUR_API_KEY");
94
94
95
-
// Query time zone infomration for a time zone ID like 'America/New_York'
95
+
// Query time zone infomration for a time zone ID like "America/New_York"
0 commit comments