1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "generate-from-text",
10 "imageData": "",
11 "imageUrl": "",
12 "text": "F",
13 "backgroundColor": "#333333",
14 "foregroundColor": "#FFFFFF",
15 "outputFormats": [
16 "png",
17 "ico",
18 ],
19 "filePrefix": "favicon",
20 "appName": "My PWA App",
21 "shortName": "",
22 "description": "",
23 "themeColor": "#FFFFFF",
24 "scope": "/",
25 "startUrl": "/",
26 "batch": [
27 {
28 "text": "F",
29 "backgroundColor": "#4A90D9",
30 "foregroundColor": "#FFFFFF",
31 "format": "png",
32 },
33 {
34 "text": "A",
35 "backgroundColor": "#E74C3C",
36 "foregroundColor": "#FFFFFF",
37 "format": "ico",
38 },
39 {
40 "text": "M",
41 "backgroundColor": "#2ECC71",
42 "foregroundColor": "#FFFFFF",
43 "format": "svg",
44 },
45 ],
46}
47
48
49run = client.actor("perryay/favicon-generator").call(run_input=run_input)
50
51
52print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
53for item in client.dataset(run["defaultDatasetId"]).iterate_items():
54 print(item)
55
56