Contoh skema penataan katalog game lokal menggunakan JavaScript dan JSON.
{ } catalog-config.js{ } catalog-config.json
Salin kode
JavaScript
/**
* Contoh konfigurasi navigasi katalog lokal cacorapp
* Digunakan untuk pemetaan daftar game pada antarmuka pengguna
*/
const localCatalogConfig = {
platformId: "cacorapp-id" ,
defaultCategory: "Slot" ,
featuredGames: [
{ id: "133" , name: "Songkran Spl" , theme: "Festival Air" },
{ id: "181" , name: "Kraken Gold" , theme: "Harta Bawah Laut" },
{ id: "070" , name: "Genies Wishes" , theme: "Jin Magis" },
{ id: "130" , name: "Rave Party Fvr" , theme: "Pesta Rave" },
{ id: "139" , name: "Safari Wilds" , theme: "Safari Afrika" }
],
preferences: {
audioDefault: true ,
quickSpinSupported: true
}
};
function getFeaturedGameById(id) {
return localCatalogConfig.featuredGames.find(game => game.id === id) || null ;
} JSON
{
"platformId" : "cacorapp-id" ,
"defaultCategory" : "Slot" ,
"featuredGames" : [
{
"id" : "133" ,
"name" : "Songkran Spl" ,
"theme" : "Festival Air"
},
{
"id" : "181" ,
"name" : "Kraken Gold" ,
"theme" : "Harta Bawah Laut"
},
{
"id" : "070" ,
"name" : "Genies Wishes" ,
"theme" : "Jin Magis"
},
{
"id" : "130" ,
"name" : "Rave Party Fvr" ,
"theme" : "Pesta Rave"
},
{
"id" : "139" ,
"name" : "Safari Wilds" ,
"theme" : "Safari Afrika"
}
],
"preferences" : {
"audioDefault" : true ,
"quickSpinSupported" : true
}
}