Class EconomyAdminApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Admin.Economy
Assembly: Unity.Services.Apis.dll
Syntax
public class EconomyAdminApi : IEconomyAdminApi, IApiAccessor
Constructors
EconomyAdminApi(IApiClient)
Initializes a new instance of the Economy
Declaration
public EconomyAdminApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
EconomyAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Economy
Declaration
public EconomyAdminApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
IApi |
apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
Type | Description |
---|---|
IApi |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
IApi |
An instance of the Configuration |
Methods
AddConfigResource(string, string, AddConfigResourceRequest, CancellationToken)
Add Config Resource Add a config resource.
Declaration
public ApiOperation<AddConfigResource201Response> AddConfigResource(string projectId, string environmentId, AddConfigResourceRequest addConfigResourceRequest, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
Add |
addConfigResourceRequest | Add config resource, currency, inventory item. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteConfigResource(string, string, string, CancellationToken)
Delete Config Resource Delete an entity config item.
Declaration
public ApiOperation DeleteConfigResource(string projectId, string environmentId, string resourceId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
string | resourceId | Unique identifier for the resource |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
EditConfigResource(string, string, string, AddConfigResourceRequest, CancellationToken)
Edit Config Resource Edit an config resource.
Declaration
public ApiOperation<AddConfigResource201Response> EditConfigResource(string projectId, string environmentId, string resourceId, AddConfigResourceRequest addConfigResourceRequest, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
string | resourceId | Unique identifier for the resource |
Add |
addConfigResourceRequest | Edit an entity config item. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetPublishedResources(string, string, int?, int?, CancellationToken)
Get Published Resources Get a list of published config resources. By default, items are sorted by id
and ordered ascending.
Declaration
public ApiOperation<GetPublishedResourcesResponse> GetPublishedResources(string projectId, string environmentId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
int? | offset | Defaults to 0 (optional) |
int? | limit | Number of items to be returned. Defaults to 1000 (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetResources(string, string, int?, int?, CancellationToken)
Get Resources Get a list of config resources. By default, items are sorted by id
and ordered ascending.
Declaration
public ApiOperation<GetResourcesResponse> GetResources(string projectId, string environmentId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
int? | offset | Defaults to 0 (optional) |
int? | limit | Number of items to be returned. Defaults to 1000 (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
PublishEconomy(string, string, PublishBody, CancellationToken)
Publish Economy Publish configuration for a project
Declaration
public ApiOperation PublishEconomy(string projectId, string environmentId, PublishBody publishBody, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
Publish |
publishBody | |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |