Contoh berkas konfigurasi lokal JavaScript dan format pertukaran data JSON x17.
JavaScript
// Konfigurasi statis lokal untuk integrasi modul katalog x17
const localConfig = {
brand: 'x17',
locale: 'id-ID',
defaultGameId: '081',
supportedPlatforms: ['android'],
gameRegistry: [
{ id: '081', name: 'Galactic Gems', category: 'Slot' },
{ id: '191', name: 'Perfect Strike', category: 'Aksi' },
{ id: '119', name: 'Speed Winner', category: 'Slot' },
{ id: '004', name: 'Fortune Tree', category: 'Slot' },
{ id: '153', name: 'Pinata Wins', category: 'Slot' }
]
};
function getGameInfo(gameId) {
return localConfig.gameRegistry.find(item => item.id === gameId) || null;
}
module.exports = { localConfig, getGameInfo };
JSON
{
"brand": "x17",
"locale": "id-ID",
"defaultGameId": "081",
"supportedPlatforms": [
"android"
],
"gameRegistry": [
{
"id": "081",
"name": "Galactic Gems",
"category": "Slot"
},
{
"id": "191",
"name": "Perfect Strike",
"category": "Aksi"
},
{
"id": "119",
"name": "Speed Winner",
"category": "Slot"
},
{
"id": "004",
"name": "Fortune Tree",
"category": "Slot"
},
{
"id": "153",
"name": "Pinata Wins",
"category": "Slot"
}
]
}