@builtwith/sdk 1.4.1 → 1.4.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 +1 -0
- package/package.json +1 -1
- package/src/index.js +12 -2
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ if (result.ok) {
|
|
|
47
47
|
|---|---|---|
|
|
48
48
|
| `domain_lookup_live({ domain })` | Root domain | Live technology lookup |
|
|
49
49
|
| `domain_lookup({ lookup })` | Root domain | Full domain API data |
|
|
50
|
+
| `change({ lookup, since? })` | Root domain or domain array | Technology additions/removals since a date |
|
|
50
51
|
| `relationships({ lookup })` | Root domain | Related websites |
|
|
51
52
|
| `free_summary({ lookup })` | Root domain | Free category/group counts |
|
|
52
53
|
| `company_to_url({ company })` | Company name | Domains from a company name |
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -252,6 +252,16 @@ class BuiltWithClient {
|
|
|
252
252
|
return this._request('domain-api', { lookup });
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
async change(params) {
|
|
256
|
+
const { lookup, since } = params || {};
|
|
257
|
+
const lookupValue = Array.isArray(lookup) ? lookup.join(',') : lookup;
|
|
258
|
+
_validate_string('lookup', lookupValue);
|
|
259
|
+
return this._request('change-api', {
|
|
260
|
+
lookup: lookupValue,
|
|
261
|
+
...(since != null ? { since } : {}),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
255
265
|
async relationships(params) {
|
|
256
266
|
const { lookup } = params || {};
|
|
257
267
|
_validate_domain(lookup);
|
|
@@ -398,7 +408,7 @@ class BuiltWithClient {
|
|
|
398
408
|
|
|
399
409
|
static async agent_auth_start() {
|
|
400
410
|
try {
|
|
401
|
-
const res = await _http_post('https://api.builtwith.com/agent-auth
|
|
411
|
+
const res = await _http_post('https://api.builtwith.com/agent-auth/start', {}, {}, 30000);
|
|
402
412
|
if (res.status < 200 || res.status >= 300) {
|
|
403
413
|
return _err(new BuiltWithError('HTTP_ERROR', `HTTP ${res.status}: ${res.body.substring(0, 200)}`, res.status), 'agent-auth-start');
|
|
404
414
|
}
|
|
@@ -415,7 +425,7 @@ class BuiltWithClient {
|
|
|
415
425
|
static async agent_auth_token(device_code) {
|
|
416
426
|
_validate_string('device_code', device_code);
|
|
417
427
|
try {
|
|
418
|
-
const res = await _http_post('https://api.builtwith.com/agent-auth
|
|
428
|
+
const res = await _http_post('https://api.builtwith.com/agent-auth/token', { device_code }, {}, 30000);
|
|
419
429
|
let data;
|
|
420
430
|
try { data = JSON.parse(res.body); } catch (_) {
|
|
421
431
|
return _err(new BuiltWithError('PARSE_ERROR', 'Failed to parse agent-auth-token response.', res.status), 'agent-auth-token');
|