1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "type": "url",
14 "data": "https://apify.com"
15 },
16 {
17 "type": "text",
18 "data": "Hello"
19 },
20 {
21 "type": "wifi",
22 "wifi": {
23 "ssid": "Home",
24 "pass": "secret",
25 "enc": "WPA"
26 }
27 },
28 {
29 "type": "vcard",
30 "vcard": {
31 "name": "Doe;Jane",
32 "phone": "+15550100",
33 "email": "jane@example.com"
34 }
35 }
36 ],
37 "csv": `type,data,ssid,password,encryption,name,phone,email,filename
38url,https://apify.com,,,,,,,apify
39wifi,,Home,secret,WPA,,,,
40vcard,,,,,Jane Doe,+15550100,jane@example.com,`
41};
42
43
44const run = await client.actor("badboxx_newlife/bulk-qr-code-generator").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54