Class CreditsClient
Client used to interact with the Qarnot budget API.
Inherited Members
Namespace: QarnotSDK
Assembly: QarnotSDK.dll
Syntax
public class CreditsClient
Methods
GetAccountCreditsAsync(CancellationToken)
Retrieve the credits of the account
Declaration
public Task<Credits> GetAccountCreditsAsync(CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | ct | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Credits> | The credits left in the account. |
GetBudgetsAsync(Guid, bool, CancellationToken)
Retrieve the budgets for a project.
Declaration
public Task<List<Budget>> GetBudgetsAsync(Guid projectUuid, bool activeOnly = true, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | projectUuid | The UUID of the project. |
| bool | activeOnly | If true, only active budgets are retrieved. If false, all budgets including archived ones are returned. Default is true. |
| CancellationToken | ct | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<List<Budget>> | A list of budgets for the project. |
GetPoolCreditsAsync(Guid, CancellationToken)
Retrieve the credits consumed by the pool
Declaration
public Task<Credits> GetPoolCreditsAsync(Guid poolUuid, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | poolUuid | The UUID of the project. |
| CancellationToken | ct | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Credits> | The credits consumed by the execution of the pool. |
GetTaskCreditsAsync(Guid, CancellationToken)
Retrieve the credits consumed by the task
Declaration
public Task<Credits> GetTaskCreditsAsync(Guid taskUuid, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | taskUuid | The UUID of the project. |
| CancellationToken | ct | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Credits> | The credits consumed by the execution of the task. |