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 "primaryColor": "#667eea",
23 "secondaryColor": "#764ba2",
24 "textColor": "#000000",
25 "starColor": "#FFD700"
26};
27
28
29const run = await client.actor("happitap/review-to-image-generator").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39