DataApi
Import
Import
Constructors
Constructor
-
Parameters
-
Optional configuration: Configuration
-
basePath: string = ...
-
axios: AxiosInstance = ...
Returns DataApi
-
Methods
Delete Custom Item
-
Parameters
-
key: string
Item key.
-
projectId: string
ID of the project.
-
customId: string
The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
Optional writeLock: string
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<void, any>>
-
Delete Custom Items
-
Deletes all data associated with a given custom ID.
Parameters
-
projectId: string
ID of the project.
-
customId: string
The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<void, any>>
-
Delete Item
-
Deletes a data item by the specified key for the given player.
Parameters
-
key: string
Item key.
-
projectId: string
ID of the project.
-
playerId: string
The player ID supplied by the Authorization service.
-
Optional writeLock: string
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<void, any>>
-
Delete Items
-
Deletes all data associated with a given player.
Parameters
-
projectId: string
ID of the project.
-
playerId: string
The player ID supplied by the Authorization service.
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<void, any>>
-
Get Custom Items
-
Retrieves save data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20.
Parameters
-
projectId: string
ID of the project.
-
customId: string
The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
Optional keys: string[]
-
Optional after: string
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<GetItemsResponse, any>>
-
Get Custom Keys
-
Gets a paged list of keys for the given custom ID, ordered alphabetically in pages of 100.
Parameters
-
projectId: string
ID of the project.
-
customId: string
The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
Optional after: string
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<GetKeysResponse, any>>
-
Get Items
-
Retrieves save data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20.
Parameters
-
projectId: string
ID of the project.
-
playerId: string
The player ID supplied by the Authorization service.
-
Optional keys: string[]
-
Optional after: string
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<GetItemsResponse, any>>
-
Get Keys
-
Gets a paged list of keys for the given player, ordered alphabetically in pages of 100.
Parameters
-
projectId: string
ID of the project.
-
playerId: string
The player ID supplied by the Authorization service.
-
Optional after: string
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<GetKeysResponse, any>>
-
Set Custom Item
-
Set a data item with a given key and value for the specified custom ID. The value is limited to a maximum size of 5 MB across all slots. The entire save state for a custom ID is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error.
Parameters
-
projectId: string
ID of the project.
-
customId: string
The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
Optional setItemBody: SetItemBody
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<SetItemResponse, any>>
-
Set Custom Item Batch
-
Set up to 20 data items with key, value and optional writeLock against the custom ID. The values are limited to a maximum size of 5 MB across all slots for the custom ID. The entire save state for a custom ID is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed.
Parameters
-
projectId: string
ID of the project.
-
customId: string
The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
Optional setItemBatchBody: SetItemBatchBody
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<SetItemBatchResponse, any>>
-
Set Item
-
Set a data item with a given key and value for the specified player. The value is limited to a maximum size of 5 MB across all slots. The entire save state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error.
Parameters
-
projectId: string
ID of the project.
-
playerId: string
The player ID supplied by the Authorization service.
-
Optional setItemBody: SetItemBody
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<SetItemResponse, any>>
-
Set Item Batch
-
Set up to 20 data items with key, value and optional writeLock for the given player. The values are limited to a maximum size of 5 MB across all slots for the player. The entire save state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed.
Parameters
-
projectId: string
ID of the project.
-
playerId: string
The player ID supplied by the Authorization service.
-
Optional setItemBatchBody: SetItemBatchBody
-
Optional options: AxiosRequestConfig<any>
Returns Promise<AxiosResponse<SetItemBatchResponse, any>>
-
Deletes a data item by the specified key for the specified custom ID.
Delete Custom Item
{RequiredError}
DataApi