1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "reviews": [
12 {
13 "authorName": "John Smith",
14 "authorTitle": "Marketing Director",
15 "authorPhotoUrl": "",
16 "reviewText": "I couldn’t be happier with the service I received! From start to finish, everything was handled with care and professionalism. The team was always there to answer my questions and made sure I was completely satisfied. It’s rare to find such great customer service these days—highly recommend!",
17 "rating": 5
18 }
19 ],
20 "customScraperActorId": "username/actor-name",
21 "scraperInput": {},
22 "apifyApiToken": "apify_api_...",
23 "primaryColor": "#667eea",
24 "secondaryColor": "#764ba2",
25 "textColor": "#000000",
26 "starColor": "#FFD700"
27};
28
29
30const run = await client.actor("happitap/review-to-image-generator").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