Documentation

InventoryApi

Import

Import

  • const { InventoryApi } = require("@unity-services/economy-2.5");

Constructors

Constructor

Methods

Add Inventory Item

  • Add an item to a player's inventory.

    summary

    Add inventory item

    throws

    {RequiredError}

    memberof

    InventoryApi

    Parameters

    Returns Promise<AxiosResponse<InventoryResponse, any>>

Delete Inventory Item

  • Delete a player's inventory item.

    summary

    Delete player's inventory item

    throws

    {RequiredError}

    memberof

    InventoryApi

    Parameters

    Returns Promise<AxiosResponse<void, any>>

Get Player Inventory

  • Get a list of inventory for a player. Results ordered by ascending playersInventoryItemId. playersIventoryItemIds and inventoryItemIds filters are optional, if not given all items will be returned. If both are given an item must match both to be returned.

    summary

    List player inventory

    throws

    {RequiredError}

    memberof

    InventoryApi

    Parameters

    Returns Promise<AxiosResponse<PlayerInventoryResponse, any>>

Update Inventory Item

  • Update a player's inventory item.

    summary

    Update player's inventory item

    throws

    {RequiredError}

    memberof

    InventoryApi

    Parameters

    Returns Promise<AxiosResponse<InventoryResponse, any>>