LootBoxTypeApi
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
createType | POST /lootbox_type | Create a new lootbox category |
generateLootBoxes | POST /lootbox_type/generate | Generates a set of loot boxes |
getTypes | GET /lootbox_type | List all loot box categories |
#
createType/*** @returns PublicLootBoxType**/async function createType(body: AdminNewLootBoxType)
Create a new lootbox category
#
Notes:NOTE: user must have scope AdminLootBoxWrite
#
Exampleconst 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);}
#
ParametersName | Type | Description | Notes |
---|---|---|---|
body | AdminNewLootBoxType | ||
#
Return type#
Authorization#
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
#
Exampleconst 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);}
#
ParametersName | Type | Description | Notes |
---|---|---|---|
body | LootBoxGenerationRequest | ||
#
Return type#
Authorization#
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
#
Exampleconst 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);}
#
ParametersThis endpoint does not have any parameters.
#
Return type#
Authorization#
HTTP request headers- Content-Type: Not defined
- Accept: /