-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtest.js
executable file
·73 lines (59 loc) · 1.71 KB
/
test.js
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
72
73
#!/usr/bin/env node
require('dotenv').config()
const BuiltWith = require('./src/index')
const url = 'lisasaysgah.com'
const multi_test = ['lisasaysgah.com', 'stacynolan.com']
const tech = 'Shopify'
const company = 'lisa says gah'
const builtwith = BuiltWith(process.env.BW_API_KEY)
async function freeTest() {
const bwData = await builtwith.free(url);
console.log(JSON.stringify(bwData));
}
async function domainTest() {
const bwData = await builtwith.domain(url, {
// noAttributeData: true
});
console.log(JSON.stringify(bwData))
}
async function listsTest() {
const bwData = await builtwith.lists(tech);
console.log(JSON.stringify(bwData));
}
async function relationshipsTest() {
const bwData = await builtwith.relationships(url);
console.log(JSON.stringify(bwData));
}
async function keywordsTest() {
const bwData = await builtwith.keywords(url);
console.log(JSON.stringify(bwData));
}
async function multiTest() {
const bwData = await builtwith.keywords(multi_test);
console.log(JSON.stringify(bwData));
}
async function trendsTest() {
const bwData = await builtwith.trends(tech);
console.log(JSON.stringify(bwData));
}
async function companyToURLTest() {
const bwData = await builtwith.companyToUrl(company);
console.log(JSON.stringify(bwData));
}
async function domainLiveTest() {
const bwData = await builtwith.domainLive(url);
console.log(JSON.stringify(bwData));
}
async function trustTest() {
const bwData = await builtwith.trust(url, { live: true, words: 'clothes, medicine'});
console.log(JSON.stringify(bwData));
}
// freeTest()
// listsTest()
// trendsTest()
// relationshipsTest()
// keywordsTest()
// multiTest()
// companyToURLTest()
// domainLiveTest()
// trustTest()