Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57ebd0d

Browse files
author
Cameron James
committed
Updated documentation
2 parents 13f3133 + eba6e4c commit 57ebd0d

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

‎README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ Please see the example below for how to set the API language.
3737
## Authentication / Identification
3838

3939
To use this API client you must have a BigDataCloud API Key.
40-
To get your personal key, just access your account and retrieve it from your [Account Dashboard](https://www.bigdatacloud.net/customer/account).
40+
To get your personal key, please access your account and retrieve it from your [Account Dashboard](https://www.bigdatacloud.net/customer/account).
4141
If you are not yet a customer, it is completely free to join.
4242

43-
Simply provide this key when initiating the api client, and it will be included in all requests to the BigDataCloud API Server.
43+
Provide this key when initiating the api client, and it will be included in all requests to the BigDataCloud API Server.
4444
If using the jQuery quick caller, you can provide the key in each request by appending the key parameter to the request payload.
45-
See the example below.
45+
See the examples below.
4646

4747

4848

@@ -71,50 +71,50 @@ See the example below.
7171

7272
var apiKey='XXX'; // Your api key found at: https://www.bigdatacloud.net/customer/account
7373

74-
//vanilla implementation
75-
var client=new BDCApiClient(apiKey);
74+
//vanilla implementation
75+
var client=new BDCApiClient(apiKey);
7676

7777
/* You can set the default api language as needed */
7878
client.localityLanguage='es';
7979

80-
client.call(
80+
client.call(
8181
/* api endpoint */
82-
'ip-geolocation-full',
82+
'ip-geolocation-full',
8383

8484
/* api query parameters */
85-
{
85+
{
8686
'ip':'8.8.8.8',
8787
/* You can override the default api language on a per-query basis
8888
* This is an optional parameter on all API calls */
8989
'localityLanguage':'zh'
9090
},
91-
function(jsonResult) {
92-
console.log('Vanilla result',jsonResult);
93-
},
94-
function(err,code) {
95-
console.log('Vanilla error',err,code);
96-
}
97-
);
98-
99-
100-
//jQuery implementation
101-
if (typeof jQuery != 'undefined') {
102-
(function($) {
103-
$.BDCApi('ip-geolocation-full',{
104-
data:{
105-
ip:'8.8.8.8',
106-
key:apiKey,
91+
function(jsonResult) {
92+
console.log('Vanilla result',jsonResult);
93+
},
94+
function(err,code) {
95+
console.log('Vanilla error',err,code);
96+
}
97+
);
98+
99+
100+
//jQuery implementation
101+
if (typeof jQuery != 'undefined') {
102+
(function($) {
103+
$.BDCApi('ip-geolocation-full',{
104+
data:{
105+
ip:'8.8.8.8',
106+
key:apiKey,
107107
localityLanguage:'en'
108-
},
109-
success:function(jsonResult) {
110-
console.log('jQuery result',jsonResult);
111-
},
112-
error:function(error,code) {
113-
console.error('jQuery eror',error,code);
114-
}
115-
});
116-
})(jQuery);
117-
}
108+
},
109+
success:function(jsonResult) {
110+
console.log('jQuery result',jsonResult);
111+
},
112+
error:function(error,code) {
113+
console.error('jQuery eror',error,code);
114+
}
115+
});
116+
})(jQuery);
117+
}
118118

119119
</script>
120120
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /