@@ -37,12 +37,12 @@ Please see the example below for how to set the API language.
37
37
## Authentication / Identification
38
38
39
39
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 ) .
41
41
If you are not yet a customer, it is completely free to join.
42
42
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.
44
44
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.
46
46
47
47
48
48
@@ -71,50 +71,50 @@ See the example below.
71
71
72
72
var apiKey= ' XXX' ; // Your api key found at: https://www.bigdatacloud.net/customer/account
73
73
74
- // vanilla implementation
75
- var client= new BDCApiClient (apiKey);
74
+ // vanilla implementation
75
+ var client= new BDCApiClient (apiKey);
76
76
77
77
/* You can set the default api language as needed */
78
78
client .localityLanguage = ' es' ;
79
79
80
- client .call (
80
+ client .call (
81
81
/* api endpoint */
82
- ' ip-geolocation-full' ,
82
+ ' ip-geolocation-full' ,
83
83
84
84
/* api query parameters */
85
- {
85
+ {
86
86
' ip' : ' 8.8.8.8' ,
87
87
/* You can override the default api language on a per-query basis
88
88
* This is an optional parameter on all API calls */
89
89
' localityLanguage' : ' zh'
90
90
},
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,
107
107
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
+ }
118
118
119
119
< / script>
120
120
```
0 commit comments