Show raw api
{
"functions": [
{
"name": "Start",
"desc": "Starts the service. Should be done via [ServiceBag]",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 42,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "HasPlayerPurchasedThisSession",
"desc": "Returns true if item has been purchased this session",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 74,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "PromisePromptPurchase",
"desc": "Prompts the user to purchase the asset, and returns true if purchased",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 97,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "PromisePlayerOwnership",
"desc": "Returns true if item has been purchased this session",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 117,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "PromiseIsOwnable",
"desc": "Returns true if item has been purchased this session",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 136,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "PromisePlayerIsPromptOpen",
"desc": "Promises the player prompt as opened",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 152,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "PromisePlayerPromptClosed",
"desc": "Promises the player prompt as opened",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 167,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "ObservePlayerOwnership",
"desc": "Observes player ownership",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 184,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "ObservePlayerAssetPurchased",
"desc": "Fires when the specified player purchases an asset",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<>"
}
],
"function_type": "method",
"source": {
"line": 207,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "ObserveAssetPurchased",
"desc": "Fires when any player purchases an asset",
"params": [
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<Player>"
}
],
"function_type": "method",
"source": {
"line": 230,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
},
{
"name": "PromisePlayerOwnershipOrPrompt",
"desc": "Checks if the asset is ownable and if it is, checks player ownership. Otherwise, it checks if the asset\nhas been purchased this session. If the asset has not been purchased this session it prompts the user to\npurchase the item.",
"params": [
{
"name": "player",
"desc": "",
"lua_type": "Player"
},
{
"name": "assetType",
"desc": "",
"lua_type": "GameConfigAssetType"
},
{
"name": "idOrKey",
"desc": "",
"lua_type": "string | number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<boolean>"
}
],
"function_type": "method",
"source": {
"line": 267,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
}
],
"properties": [],
"types": [],
"name": "GameProductDataService",
"desc": "",
"source": {
"line": 4,
"path": "src/gameproductservice/src/Shared/GameProductDataService.lua"
}
}