Struktur konfigurasi objek simulasi sesi permainan h17.
{ } h17-config.js{ } h17-config.json
Salin kode
JavaScript
// Konfigurasi lingkungan simulasi lokal h17
const h17ClientConfig = {
brand: 'h17' ,
region: 'id' ,
defaultGame: '080' ,
availableGames: ['080' , '199' , '119' , '195' , '185' ],
session: {
tokenType: 'Bearer' ,
storageKey: 'h17_local_session'
}
};
function getGameLaunchData(gameId) {
if (!h17ClientConfig.availableGames.includes(gameId)) {
return { status: 'error' , message: 'Game ID tidak valid' };
}
return {
status: 'success' ,
brand: h17ClientConfig.brand,
target: gameId,
debugMode: true
};
} JSON
{
"brand" : "h17" ,
"country" : "id" ,
"defaultGame" : "080" ,
"gamesCatalog" : [
{"id" : "080" , "name" : "Jack Frosts" },
{"id" : "199" , "name" : "Farmstead Fort" },
{"id" : "119" , "name" : "Speed Winner" },
{"id" : "195" , "name" : "Super Wildrix" },
{"id" : "185" , "name" : "Poker Kingdom" }
],
"environment" : "offline-mock"
}