Skip to main content

LootBoxTypeApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
createTypePOST /lootbox_typeCreate a new lootbox category
generateLootBoxesPOST /lootbox_type/generateGenerates a set of loot boxes
getTypesGET /lootbox_typeList all loot box categories

createType#

/*** @returns PublicLootBoxType**/async function createType(body: AdminNewLootBoxType)

Create a new lootbox category

Notes:#

NOTE: user must have scope AdminLootBoxWrite

Example#

const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let body = new YatJs.AdminNewLootBoxType(); // AdminNewLootBoxType // populate body...
try {  let res = await api.lootBoxType().createType(body);  // res is of type PublicLootBoxType  console.log('API called successfully. Result: ', res);} catch (error) {  console.error(error);}

Parameters#

NameTypeDescriptionNotes
bodyAdminNewLootBoxType

Return type#

PublicLootBoxType

Authorization#

two_factor

HTTP request headers#

  • Content-Type: Not defined
  • Accept: /

generateLootBoxes#

/*** @returns LootBoxSet**/async function generateLootBoxes(body: LootBoxGenerationRequest)

Generates a set of loot boxes

Notes:#

NOTE: user must have scope AdminLootBoxWrite

Example#

const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let body = new YatJs.LootBoxGenerationRequest(); // LootBoxGenerationRequest // populate body...
try {  let res = await api.lootBoxType().generateLootBoxes(body);  // res is of type LootBoxSet  console.log('API called successfully. Result: ', res);} catch (error) {  console.error(error);}

Parameters#

NameTypeDescriptionNotes
bodyLootBoxGenerationRequest

Return type#

LootBoxSet

Authorization#

two_factor

HTTP request headers#

  • Content-Type: Not defined
  • Accept: /

getTypes#

/*** @returns [PublicLootBoxType]**/async function getTypes()

List all loot box categories

Notes:#

NOTE: user must have scope AdminLootBoxRead

Example#

const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
try {  let res = await api.lootBoxType().getTypes();  // res is of type [PublicLootBoxType]  console.log('API called successfully. Result: ', res);} catch (error) {  console.error(error);}

Parameters#

This endpoint does not have any parameters.

Return type#

[PublicLootBoxType]

Authorization#

two_factor

HTTP request headers#

  • Content-Type: Not defined
  • Accept: /