1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "repositories": [
12 "github.com/kubernetes/kubernetes",
13 "github.com/nodejs/node",
14 "github.com/golang/go",
15 "github.com/prometheus/prometheus",
16 "github.com/elastic/elasticsearch",
17 "github.com/hashicorp/terraform",
18 "github.com/ansible/ansible",
19 "github.com/rust-lang/rust"
20 ],
21 "repositoryList": `github.com/kubernetes/kubernetes
22github.com/nodejs/node`,
23 "maxRepositories": 8,
24 "failBelowScore": 5,
25 "includeRawDetails": false,
26 "requestTimeoutSecs": 30
27};
28
29
30const run = await client.actor("automation-lab/openssf-scorecard-projects-scraper").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40