Beamable SDK
|
This type defines the Client main entry point for the Inventory feature. More...
Public Member Functions | |
Promise< GetMultipliersResponse > | GetMultipliers () |
Provides the VIP Bonus multipliers that are applicable for this player according to their tier. More... | |
Promise< PreviewCurrencyGainResponse > | PreviewCurrencyGain (Dictionary< string, long > currencyIdsToAmount) |
Players may sometimes receive additional currency as a result of qualifying for a VIP Tier This API previews what that amount of currency would be ahead of an update. More... | |
Promise< Unit > | SetCurrency (string currencyId, long amount, string transaction=null) |
Sets the currency. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | SetCurrency (CurrencyRef currency, long amount, string transaction=null) |
Sets the currency. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | AddCurrency (string currencyId, long amount, string transaction=null) |
Adds the currency If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | AddCurrency (CurrencyRef currency, long amount, string transaction=null) |
Adds the currency If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | SetCurrencies (Dictionary< string, long > currencyIdsToAmount, string transaction=null) |
Set multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | SetCurrencies (Dictionary< CurrencyRef, long > currencyToAmount, string transaction=null) |
Set multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | AddCurrencies (Dictionary< string, long > currencyIdsToAmount, string transaction=null) |
Add multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | AddCurrencies (Dictionary< CurrencyRef, long > currencyToAmount, string transaction=null) |
Add multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Dictionary< string, long > > | GetCurrencies (string[] currencyIds) |
Get a set of currency values for the current player. More... | |
Promise< Dictionary< CurrencyRef, long > > | GetCurrencies (CurrencyRef[] currencyRefs) |
Get a set of currency values for the current player. More... | |
Promise< long > | GetCurrency (string currencyId) |
Gets the currency. More... | |
Promise< long > | GetCurrency (CurrencyRef currency) |
Gets the currency. More... | |
Promise< Unit > | SetCurrencyProperties (string currencyId, List< CurrencyProperty > properties, string transaction=null) |
Set the CurrencyProperty values for a player's currency More... | |
Promise< Unit > | SetCurrencyProperties (CurrencyRef currency, List< CurrencyProperty > properties, string transaction=null) |
Set the CurrencyProperty values for a player's currency More... | |
Promise< Unit > | AddItem (ItemRef itemRef, Dictionary< string, string > properties=null, string transaction=null) |
Add an instance of the given itemRef to the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | AddItem (string contentId, Dictionary< string, string > properties=null, string transaction=null) |
Add an item instance of the given contentId to the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | DeleteItem (string contentId, long itemId, string transaction=null) |
Remove an item instance from the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | UpdateItem (ItemRef itemRef, long itemId, Dictionary< string, string > properties, string transaction=null) |
Update the instance level item properties of an item in the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | UpdateItem (string contentId, long itemId, Dictionary< string, string > properties, string transaction=null) |
Update the instance level item properties of an item in the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method. More... | |
Promise< Unit > | Update (Action< InventoryUpdateBuilder > action, string transaction=null) |
Promise< Unit > | Update (InventoryUpdateBuilder builder, string transaction=null) |
Perform multiple updates to the player's inventory in one network call. The InventoryUpdateBuilder that you pass to this method will be converted into one update call to Beamable. More... | |
Promise< List< InventoryObject< TContent > > > | GetItems< TContent > () |
Get every InventoryObject<TContent> that is of a specific item content type. More... | |
Promise< List< InventoryObject< TContent > > > | GetItems< TContent > (params ItemRef< TContent >[] itemReferences) |
Get the InventoryObject<TContent> that are of a specific item content type and match the given itemReferences More... | |
Public Member Functions inherited from Beamable.Common.Api.ISupportsGet< InventoryView > | |
Promise< TData > | GetCurrent (string scope="") |
Manually fetch the available data. If the server hasn't delivered a new update, this method will not return the absolute latest data unless you pass forceRefresh as true. More... | |
This type defines the Client main entry point for the Inventory feature.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.AddCurrencies | ( | Dictionary< CurrencyRef, long > | currencyToAmount, |
string | transaction = null |
||
) |
Add multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currencyToAmount | A dictionary where the keys are CurrencyRefs, and the values are the new currency values for the player |
transaction | An inventory transaction ID. Leave this argument empty. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.AddCurrencies | ( | Dictionary< string, long > | currencyIdsToAmount, |
string | transaction = null |
||
) |
Add multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currencyIdsToAmount | A dictionary where the keys are content IDs of the currency, and the values are the new currency values for the player |
transaction | An inventory transaction ID. Leave this argument empty. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.AddCurrency | ( | CurrencyRef | currency, |
long | amount, | ||
string | transaction = null |
||
) |
Adds the currency If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currency | |
amount | |
transaction |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.AddCurrency | ( | string | currencyId, |
long | amount, | ||
string | transaction = null |
||
) |
Adds the currency If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currencyId | |
amount | |
transaction |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.AddItem | ( | ItemRef | itemRef, |
Dictionary< string, string > | properties = null , |
||
string | transaction = null |
||
) |
Add an instance of the given itemRef to the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
itemRef | A ItemRef |
properties | a set of instance properties for the new item |
transaction | An inventory transaction id |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.AddItem | ( | string | contentId, |
Dictionary< string, string > | properties = null , |
||
string | transaction = null |
||
) |
Add an item instance of the given contentId to the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
contentId | A content ID of the item type |
properties | a set of instance properties for the new item |
transaction | An inventory transaction ID. Leave this argument empty. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.DeleteItem | ( | string | contentId, |
long | itemId, | ||
string | transaction = null |
||
) |
Remove an item instance from the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
contentId | The content ID of the type of item to remove |
itemId | The runtime ID of the item to remove |
transaction | an inventory transaction ID |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Dictionary< CurrencyRef, long > > Beamable.Common.Api.Inventory.IInventoryApi.GetCurrencies | ( | CurrencyRef[] | currencyRefs | ) |
Get a set of currency values for the current player.
currencyRefs | CurrencyRefs for the currencies that will be returned |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Dictionary< string, long > > Beamable.Common.Api.Inventory.IInventoryApi.GetCurrencies | ( | string[] | currencyIds | ) |
Get a set of currency values for the current player.
currencyIds | the content IDs for the currencies that will be returned |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< long > Beamable.Common.Api.Inventory.IInventoryApi.GetCurrency | ( | CurrencyRef | currency | ) |
Gets the currency.
currency | A CurrencyRef |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< long > Beamable.Common.Api.Inventory.IInventoryApi.GetCurrency | ( | string | currencyId | ) |
Gets the currency.
currencyId |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< List< InventoryObject< TContent > > > Beamable.Common.Api.Inventory.IInventoryApi.GetItems< TContent > | ( | ) |
Get every InventoryObject<TContent> that is of a specific item content type.
TContent | The type of content to retrieve. All children types will be included the result. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
TContent | : | ItemContent | |
TContent | : | new() |
Promise< List< InventoryObject< TContent > > > Beamable.Common.Api.Inventory.IInventoryApi.GetItems< TContent > | ( | params ItemRef< TContent >[] | itemReferences | ) |
Get the InventoryObject<TContent> that are of a specific item content type and match the given itemReferences
itemReferences | Filter for only the items that match the given ItemRef<TContent> types. |
TContent | The type of content to retrieve. All children types will be included the result. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
TContent | : | ItemContent | |
TContent | : | new() |
Promise< GetMultipliersResponse > Beamable.Common.Api.Inventory.IInventoryApi.GetMultipliers | ( | ) |
Provides the VIP Bonus multipliers that are applicable for this player according to their tier.
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< PreviewCurrencyGainResponse > Beamable.Common.Api.Inventory.IInventoryApi.PreviewCurrencyGain | ( | Dictionary< string, long > | currencyIdsToAmount | ) |
Players may sometimes receive additional currency as a result of qualifying for a VIP Tier This API previews what that amount of currency would be ahead of an update.
currencyIdsToAmount |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.SetCurrencies | ( | Dictionary< CurrencyRef, long > | currencyToAmount, |
string | transaction = null |
||
) |
Set multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currencyToAmount | A dictionary where the keys are CurrencyRefs, and the values are the new currency values for the player |
transaction | An inventory transaction ID. Leave this argument empty. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.SetCurrencies | ( | Dictionary< string, long > | currencyIdsToAmount, |
string | transaction = null |
||
) |
Set multiple currency values. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currencyIdsToAmount | A dictionary where the keys are content IDs of the currency, and the values are the new currency values for the player |
transaction | An inventory transaction ID. Leave this argument empty. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.SetCurrency | ( | CurrencyRef | currency, |
long | amount, | ||
string | transaction = null |
||
) |
Sets the currency. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currency | |
amount | |
transaction |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.SetCurrency | ( | string | currencyId, |
long | amount, | ||
string | transaction = null |
||
) |
Sets the currency. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
currencyId | |
amount | |
transaction |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.SetCurrencyProperties | ( | CurrencyRef | currency, |
List< CurrencyProperty > | properties, | ||
string | transaction = null |
||
) |
Set the CurrencyProperty values for a player's currency
currency | A CurrencyRef |
properties | A list of CurrencyProperty values |
transaction | An inventory transaction id |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.SetCurrencyProperties | ( | string | currencyId, |
List< CurrencyProperty > | properties, | ||
string | transaction = null |
||
) |
Set the CurrencyProperty values for a player's currency
currencyId | The content id of the currency |
properties | A list of CurrencyProperty values |
transaction | An inventory transaction id. |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.Update | ( | Action< InventoryUpdateBuilder > | action, |
string | transaction = null |
||
) |
action | A configurator for the InventoryUpdateBuilder. You should configure the builder with all of the inventory updates. If you already have an instance of the builder, use the Update(InventoryUpdateBuilder,string) method instead. |
transaction | an inventory transaction ID |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.Update | ( | InventoryUpdateBuilder | builder, |
string | transaction = null |
||
) |
Perform multiple updates to the player's inventory in one network call. The InventoryUpdateBuilder that you pass to this method will be converted into one update call to Beamable.
builder | An InventoryUpdateBuilder containing all of the inventory updates. Use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method to configure an InventoryUpdateBuilder instead. |
transaction | an inventory transaction ID |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.UpdateItem | ( | ItemRef | itemRef, |
long | itemId, | ||
Dictionary< string, string > | properties, | ||
string | transaction = null |
||
) |
Update the instance level item properties of an item in the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
itemRef | An ItemRef pointing to the content type of the item to update. |
itemId | The runtime ID of the item to remove |
properties | A new set of instance property values for the item. This will overwrite the existing properties. |
transaction | an inventory transaction ID |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.
Promise< Unit > Beamable.Common.Api.Inventory.IInventoryApi.UpdateItem | ( | string | contentId, |
long | itemId, | ||
Dictionary< string, string > | properties, | ||
string | transaction = null |
||
) |
Update the instance level item properties of an item in the player's inventory. If you need to make multiple inventory updates, use the Update(System.Action<Beamable.Common.Api.Inventory.InventoryUpdateBuilder>,string) method.
contentId | A content ID pointing to the content type of the item to update. |
itemId | The runtime ID of the item to remove |
properties | A new set of instance property values for the item. This will overwrite the existing properties. |
transaction | an inventory transaction ID |
Implemented in Beamable.Common.Api.Inventory.AbsInventoryApi.