Loading...
Searching...
No Matches
AccelByte::Api::Inventory Class Reference

Provide APIs to access Inventory service. More...

#include <AccelByteInventoryApi.h>

Inheritance diagram for AccelByte::Api::Inventory:

Public Member Functions

 Inventory (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 Inventory (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr GetInventoryConfigurations (THandler< FAccelByteModelsInventoryConfigurationsPagingResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteInventoryConfigurationSortBy SortBy=EAccelByteInventoryConfigurationSortBy::CREATED_AT_DESC, int32 Limit=20, int32 Offset=0, FString const &InventoryConfigurationCode=TEXT(""))
 Get a list of inventory configurations in a namespace.
FAccelByteTaskWPtr GetInventoryTags (THandler< FAccelByteModelsInventoryTagPagingResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteInventoryUtilitiesSortBy SortBy=EAccelByteInventoryUtilitiesSortBy::CREATED_AT_DESC, int32 Limit=20, int32 Offset=0)
 Get a list of inventory tags in a namespace.
FAccelByteTaskWPtr GetUserInventories (THandler< FAccelByteModelsUserInventoriesPagingResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteUserInventoriesSortBy SortBy=EAccelByteUserInventoriesSortBy::CREATED_AT_DESC, int32 Limit=20, int32 Offset=0, FString const &InventoryConfigurationCode=TEXT(""))
 Get a list of user inventories in a namespace.
FAccelByteTaskWPtr GetItemTypes (THandler< FAccelByteModelsItemTypePagingResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteInventoryUtilitiesSortBy SortBy=EAccelByteInventoryUtilitiesSortBy::CREATED_AT_DESC, int32 Limit=20, int32 Offset=0)
 Get a list of item types in a namespace.
FAccelByteTaskWPtr GetUserInventoryAllItems (FString const &InventoryId, THandler< FAccelByteModelsUserItemsPagingResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteUserItemsSortBy SortBy=EAccelByteUserItemsSortBy::CREATED_AT_DESC, int32 Limit=20, int32 Offset=0, FString const &SourceItemId=TEXT(""), FString const &Tags=TEXT(""))
 Get a list of user items from specific user inventory.
FAccelByteTaskWPtr GetUserInventoryItem (FString const &InventoryId, FString const &SlotId, FString const &SourceItemId, THandler< FAccelByteModelsUserItemResponse > const &OnSuccess, FErrorHandler const &OnError)
 Get a specific item from specific user inventory.
FAccelByteTaskWPtr BulkUpdateInventoryItems (FString const &InventoryId, TArray< FAccelByteModelsUpdateUserInventoryItemRequest > const &UpdatedItemsRequest, THandler< TArray< FAccelByteModelsUpdateUserInventoryItemResponse > > const &OnSuccess, FErrorHandler const &OnError)
 Bulk update user inventory items.
FAccelByteTaskWPtr BulkDeleteInventoryItems (FString const &InventoryId, TArray< FAccelByteModelsDeleteUserInventoryItemsRequest > const &DeletedItemsRequest, THandler< TArray< FAccelByteModelsDeleteUserInventoryItemResponse > > const &OnSuccess, FErrorHandler const &OnError)
 Bulk delete user inventory items.
FAccelByteTaskWPtr MoveItemsBetweenInventories (FString const &TargetInventoryId, FAccelByteModelsMoveUserItemsBetweenInventoriesRequest const &MoveItemsRequest, THandler< FAccelByteModelsMoveUserItemsBetweenInventoriesResponse > const &OnSuccess, FErrorHandler const &OnError)
 Bulk delete user inventory items.
FAccelByteTaskWPtr ConsumeUserInventoryItem (FString const &InventoryId, FAccelByteModelsConsumeUserItemsRequest const &ConsumedItemsRequest, THandler< FAccelByteModelsUserItemResponse > const &OnSuccess, FErrorHandler const &OnError)
 Consume user inventory item.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

Provide APIs to access Inventory service.

Member Function Documentation

◆ BulkDeleteInventoryItems()

FAccelByteTaskWPtr AccelByte::Api::Inventory::BulkDeleteInventoryItems ( FString const & InventoryId,
TArray< FAccelByteModelsDeleteUserInventoryItemsRequest > const & DeletedItemsRequest,
THandler< TArray< FAccelByteModelsDeleteUserInventoryItemResponse > > const & OnSuccess,
FErrorHandler const & OnError )

Bulk delete user inventory items.

Parameters
InventoryIdThe id of user's inventory.
DeletedItemsRequestAn array of items that will be deleted.
OnSuccessThis will be called when the operation succeeded. The result is TArray<FAccelByteModelsDeleteUserInventoryItemResponse>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkUpdateInventoryItems()

FAccelByteTaskWPtr AccelByte::Api::Inventory::BulkUpdateInventoryItems ( FString const & InventoryId,
TArray< FAccelByteModelsUpdateUserInventoryItemRequest > const & UpdatedItemsRequest,
THandler< TArray< FAccelByteModelsUpdateUserInventoryItemResponse > > const & OnSuccess,
FErrorHandler const & OnError )

Bulk update user inventory items.

Parameters
InventoryIdThe id of user's inventory.
UpdatedItemsRequestAn array of items that will be updated.
OnSuccessThis will be called when the operation succeeded. The result is TArray<FAccelByteModelsUpdateUserInventoryItemResponse>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ ConsumeUserInventoryItem()

FAccelByteTaskWPtr AccelByte::Api::Inventory::ConsumeUserInventoryItem ( FString const & InventoryId,
FAccelByteModelsConsumeUserItemsRequest const & ConsumedItemsRequest,
THandler< FAccelByteModelsUserItemResponse > const & OnSuccess,
FErrorHandler const & OnError )

Consume user inventory item.

Parameters
InventoryIdThe id of user's inventory.
ConsumedItemsRequestVariable contains an array of items that will be consumed.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsUserItemResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetInventoryConfigurations()

FAccelByteTaskWPtr AccelByte::Api::Inventory::GetInventoryConfigurations ( THandler< FAccelByteModelsInventoryConfigurationsPagingResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteInventoryConfigurationSortBy SortBy = EAccelByteInventoryConfigurationSortBy::CREATED_AT_DESC,
int32 Limit = 20,
int32 Offset = 0,
FString const & InventoryConfigurationCode = TEXT("") )

Get a list of inventory configurations in a namespace.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsInventoryConfigurationsPagingResponse.
OnErrorThis will be called when the operation failed.
SortByThe sorting criteria for the list of inventory configurations. Value: createdAt, updatedAt, code, maxItems. default = createdAt:desc.
LimitNumber of content per page to retrieve. Default value : 20
OffsetNumber of page to retrieve. Default value : 0
InventoryConfigurationCodeThe code of a certain inventory configuration.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetInventoryTags()

FAccelByteTaskWPtr AccelByte::Api::Inventory::GetInventoryTags ( THandler< FAccelByteModelsInventoryTagPagingResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteInventoryUtilitiesSortBy SortBy = EAccelByteInventoryUtilitiesSortBy::CREATED_AT_DESC,
int32 Limit = 20,
int32 Offset = 0 )

Get a list of inventory tags in a namespace.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsInventoryTagPagingResponse.
OnErrorThis will be called when the operation failed.
SortByThe sorting criteria for the list of inventory types. Value: createdAt, name. default = createdAt:desc.
LimitNumber of content per page to retrieve. Default value : 20
OffsetNumber of page to retrieve. Default value : 0
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemTypes()

FAccelByteTaskWPtr AccelByte::Api::Inventory::GetItemTypes ( THandler< FAccelByteModelsItemTypePagingResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteInventoryUtilitiesSortBy SortBy = EAccelByteInventoryUtilitiesSortBy::CREATED_AT_DESC,
int32 Limit = 20,
int32 Offset = 0 )

Get a list of item types in a namespace.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsItemTypePagingResponse.
OnErrorThis will be called when the operation failed.
SortByThe sorting criteria for the list of inventory types. Value: createdAt, name. default = createdAt:desc.
LimitNumber of content per page to retrieve. Default value : 20
OffsetNumber of page to retrieve. Default value : 0
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetUserInventories()

FAccelByteTaskWPtr AccelByte::Api::Inventory::GetUserInventories ( THandler< FAccelByteModelsUserInventoriesPagingResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteUserInventoriesSortBy SortBy = EAccelByteUserInventoriesSortBy::CREATED_AT_DESC,
int32 Limit = 20,
int32 Offset = 0,
FString const & InventoryConfigurationCode = TEXT("") )

Get a list of user inventories in a namespace.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsUserInventoriesPagingResponse.
OnErrorThis will be called when the operation failed.
SortByThe sorting criteria for the list of user inventories. Value: createdAt, updatedAt. default = createdAt:desc.
LimitNumber of content per page to retrieve. Default value : 20
OffsetNumber of page to retrieve. Default value : 0
InventoryConfigurationCodeThe code of a certain inventory configuration.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetUserInventoryAllItems()

FAccelByteTaskWPtr AccelByte::Api::Inventory::GetUserInventoryAllItems ( FString const & InventoryId,
THandler< FAccelByteModelsUserItemsPagingResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteUserItemsSortBy SortBy = EAccelByteUserItemsSortBy::CREATED_AT_DESC,
int32 Limit = 20,
int32 Offset = 0,
FString const & SourceItemId = TEXT(""),
FString const & Tags = TEXT("") )

Get a list of user items from specific user inventory.

Parameters
InventoryIdThe id of user's inventory.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsUserItemsPagingResponse.
OnErrorThis will be called when the operation failed.
SortByThe sorting criteria for the list of inventory types. Value: createdAt, updatedAt, quantity. default = createdAt:desc.
LimitNumber of content per page to retrieve. Default value : 20
OffsetNumber of page to retrieve. Default value : 0
SourceItemIdThe id of source item.
TagsThe Tags of user's item.
QuantityThe preferred minimum quantity of an item.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetUserInventoryItem()

FAccelByteTaskWPtr AccelByte::Api::Inventory::GetUserInventoryItem ( FString const & InventoryId,
FString const & SlotId,
FString const & SourceItemId,
THandler< FAccelByteModelsUserItemResponse > const & OnSuccess,
FErrorHandler const & OnError )

Get a specific item from specific user inventory.

Parameters
InventoryIdThe id of user's inventory.
SlotIdThe id of item slot.
SourceItemIdThe id of item source.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsUserItemResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ MoveItemsBetweenInventories()

FAccelByteTaskWPtr AccelByte::Api::Inventory::MoveItemsBetweenInventories ( FString const & TargetInventoryId,
FAccelByteModelsMoveUserItemsBetweenInventoriesRequest const & MoveItemsRequest,
THandler< FAccelByteModelsMoveUserItemsBetweenInventoriesResponse > const & OnSuccess,
FErrorHandler const & OnError )

Bulk delete user inventory items.

Parameters
TargetInventoryIdThe target id of user's inventory.
MoveItemsRequestVariable contains an array of items that will be moved as well as the inventory destination id.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsMoveUserItemsBetweenInventoriesResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.