ip-finder-client 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,8 +22,7 @@ pnpm add ip-finder-client
22
22
  import { IPInsight } from 'ip-finder-client';
23
23
 
24
24
  const client = new IPInsight({
25
- apiKey: 'your-api-key',
26
- baseUrl: 'https://api.your-domain.com' // Your API endpoint
25
+ apiKey: 'your-api-key'
27
26
  });
28
27
 
29
28
  // Look up an IP address
@@ -41,9 +40,6 @@ const client = new IPInsight({
41
40
  // Required: Your API key
42
41
  apiKey: 'your-api-key',
43
42
 
44
- // Optional: API base URL (defaults to production)
45
- baseUrl: 'https://api.your-domain.com',
46
-
47
43
  // Optional: Request timeout in ms (default: 10000)
48
44
  timeout: 5000,
49
45
 
@@ -179,8 +175,7 @@ Alternatively, use the factory function:
179
175
  import { createClient } from 'ip-finder-client';
180
176
 
181
177
  const client = createClient({
182
- apiKey: 'your-api-key',
183
- baseUrl: 'https://api.your-domain.com'
178
+ apiKey: 'your-api-key'
184
179
  });
185
180
  ```
186
181
 
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ __export(src_exports, {
26
26
  default: () => src_default
27
27
  });
28
28
  module.exports = __toCommonJS(src_exports);
29
- var DEFAULT_BASE_URL = "https://your-api-domain.com";
29
+ var DEFAULT_BASE_URL = "https://api.ipwhere.site";
30
30
  var DEFAULT_TIMEOUT = 1e4;
31
31
  var DEFAULT_RETRIES = 2;
32
32
  var IPInsightError = class _IPInsightError extends Error {
@@ -159,7 +159,7 @@ var IPInsight = class {
159
159
  const response = await fetch(url, {
160
160
  method: "GET",
161
161
  headers: {
162
- "X-API-Key": this.apiKey,
162
+ "Authorization": `ApiKey ${this.apiKey}`,
163
163
  "Accept": "application/json",
164
164
  "User-Agent": "ip-finder-client/1.0.0"
165
165
  },
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var DEFAULT_BASE_URL = "https://your-api-domain.com";
2
+ var DEFAULT_BASE_URL = "https://api.ipwhere.site";
3
3
  var DEFAULT_TIMEOUT = 1e4;
4
4
  var DEFAULT_RETRIES = 2;
5
5
  var IPInsightError = class _IPInsightError extends Error {
@@ -132,7 +132,7 @@ var IPInsight = class {
132
132
  const response = await fetch(url, {
133
133
  method: "GET",
134
134
  headers: {
135
- "X-API-Key": this.apiKey,
135
+ "Authorization": `ApiKey ${this.apiKey}`,
136
136
  "Accept": "application/json",
137
137
  "User-Agent": "ip-finder-client/1.0.0"
138
138
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ip-finder-client",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Lightweight SDK for IP geolocation, ASN lookup, and network information",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",