Change example games
							parent
							
								
									7d3d70e24e
								
							
						
					
					
						commit
						c87c32af71
					
				| 
						 | 
					@ -29,9 +29,9 @@ main();
 | 
				
			||||||
async function main() {
 | 
					async function main() {
 | 
				
			||||||
    // Local variables
 | 
					    // Local variables
 | 
				
			||||||
    const gameList = [
 | 
					    const gameList = [
 | 
				
			||||||
        "Four Elements Trainer",
 | 
					        "City of broken dreamers",
 | 
				
			||||||
        "corrupted kingdoms",
 | 
					        "Seeds of chaos",
 | 
				
			||||||
        "summertime saga"
 | 
					        "MIST"
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Log in the platform
 | 
					    // Log in the platform
 | 
				
			||||||
| 
						 | 
					@ -61,13 +61,14 @@ async function main() {
 | 
				
			||||||
        const query: HandiworkSearchQuery = new HandiworkSearchQuery();
 | 
					        const query: HandiworkSearchQuery = new HandiworkSearchQuery();
 | 
				
			||||||
        query.category = "games";
 | 
					        query.category = "games";
 | 
				
			||||||
        query.keywords = gamename;
 | 
					        query.keywords = gamename;
 | 
				
			||||||
 | 
					        query.order = "likes"; // To find the most popular games
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Fetch the first result
 | 
					        // Fetch the first result
 | 
				
			||||||
        const searchResult = await searchHandiwork<Game>(query, 1);
 | 
					        const searchResult = await searchHandiwork<Game>(query, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // No game found
 | 
					        // No game found
 | 
				
			||||||
        if (searchResult.length === 0) {
 | 
					        if (searchResult.length === 0) {
 | 
				
			||||||
            console.log(`No data found for '${gamename}'`);
 | 
					            console.log(`No data found for '${gamename}'\n`);
 | 
				
			||||||
            continue;
 | 
					            continue;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue