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 EconomyAdminApi class using a Configuration object and client instance.
Declaration
public EconomyAdminApi(IApiClient apiClient)
Parameters
| Type | Name | Description |
|---|---|---|
| IApiClient | apiClient | The client interface for synchronous API access. |
EconomyAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the EconomyAdminApi class using a Configuration object and client instance.
Declaration
public EconomyAdminApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| IApiClient | apiClient | The client interface for synchronous API access. |
| IApiConfiguration | apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
| Type | Description |
|---|---|
| IApiClient |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
| Type | Description |
|---|---|
| IApiConfiguration | 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 |
| AddConfigResourceRequest | addConfigResourceRequest | Add config resource, currency, inventory item. |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<AddConfigResource201Response> | 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 |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation | 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 |
| AddConfigResourceRequest | addConfigResourceRequest | Edit an entity config item. |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<AddConfigResource201Response> | 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) |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<GetPublishedResourcesResponse> | 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) |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<GetResourcesResponse> | 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 |
| PublishBody | publishBody | |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation | The operation |