-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.d.ts
More file actions
71 lines (53 loc) · 2.35 KB
/
index.d.ts
File metadata and controls
71 lines (53 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* BigDataCloud API Client
*
* All API endpoints are accessed via magic methods in camelCase format:
* method | endpoint
*
* Example: client.getIpGeolocationFull({ ip: '8.8.8.8' })
*
* @see https://www.bigdatacloud.com for API documentation
*/
interface BigDataCloudClient {
/** IP Geolocation - Get geolocation data for an IP address */
getIpGeolocation(params?: Record<string, any>): Promise<any>;
/** IP Geolocation Full - Comprehensive geolocation with confidence and hazard data */
getIpGeolocationFull(params?: Record<string, any>): Promise<any>;
/** IP Geolocation with Confidence - Geolocation with confidence area */
getIpGeolocationWithConfidence(params?: Record<string, any>): Promise<any>;
/** Reverse Geocode - Convert coordinates to address */
getReverseGeocode(params?: Record<string, any>): Promise<any>;
/** Reverse Geocode with Timezone */
getReverseGeocodeWithTimezone(params?: Record<string, any>): Promise<any>;
/** Country by IP */
getCountryByIp(params?: Record<string, any>): Promise<any>;
/** ASN Info */
getAsnInfo(params?: Record<string, any>): Promise<any>;
/** Network by IP */
getNetworkByIp(params?: Record<string, any>): Promise<any>;
/** Timezone by IP */
getTimezoneByIp(params?: Record<string, any>): Promise<any>;
/** Timezone by Location */
getTimezoneByLocation(params?: Record<string, any>): Promise<any>;
/** Phone Number Validate */
getPhoneNumberValidate(params?: Record<string, any>): Promise<any>;
/** Email Verify */
getEmailVerify(params?: Record<string, any>): Promise<any>;
/** User Agent Info */
getUserAgentInfo(params?: Record<string, any>): Promise<any>;
/** IP Hazard Report */
getHazardReport(params?: Record<string, any>): Promise<any>;
/** Tor Exit Nodes List */
getTorExitNodesList(params?: Record<string, any>): Promise<any>;
/** Generic method call for any endpoint */
[key: string]: (params?: Record<string, any>) => Promise<any>;
}
/**
* Create a BigDataCloud API client
* @param apiKey - Your BigDataCloud API key from https://www.bigdatacloud.com/account
* @param nameSpace - API namespace (default: 'data')
* @param server - API server hostname (default: 'api-bdc.net')
*/
declare function createClient(apiKey: string, nameSpace?: string, server?: string): BigDataCloudClient;
export = createClient;
export { BigDataCloudClient, createClient };