1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "statusPages": [
12 "www.githubstatus.com",
13 "www.cloudflarestatus.com",
14 "discordstatus.com",
15 "status.atlassian.com",
16 "instat.us",
17 "statusio:55957a99e800baa4470002da"
18 ],
19 "creditTiers": [
20 {
21 "belowPercent": 99.9,
22 "creditPercent": 10
23 },
24 {
25 "belowPercent": 99,
26 "creditPercent": 25
27 },
28 {
29 "belowPercent": 95,
30 "creditPercent": 50
31 }
32 ],
33 "vendorSettings": {
34 "www.githubstatus.com": {
35 "name": "GitHub",
36 "monthlyFeeUsd": 400
37 }
38 }
39};
40
41
42const run = await client.actor("leons0016/status-page-monitor-ledger").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52