Credits¶
Access via client.credits.
signtraker.credits.CreditsClient ¶
CreditsClient(api_key: Optional[str] = None, base_url: Optional[str] = None, *, subdomain: Optional[str] = None, timeout_seconds: Optional[float] = None, max_retries: Optional[int] = None, retry_backoff_seconds: Optional[float] = None)
Bases: BaseClient
Client for the /api/credits endpoints.
Source code in signtraker/base_client.py
list_awards ¶
list_awards(*, awarded_to: Optional[int] = None, filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[ODataValue] = None, select: Optional[ODataValue] = None) -> List[Dict[str, Any]]
List credit awards, optionally filtered to a specific recipient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
awarded_to
|
Optional[int]
|
Agent ID to filter awards granted to that agent. |
None
|
filter
|
Optional[str]
|
OData |
None
|
top
|
Optional[int]
|
OData |
None
|
skip
|
Optional[int]
|
OData |
None
|
orderby
|
Optional[ODataValue]
|
OData |
None
|
select
|
Optional[ODataValue]
|
OData |
None
|
Returns:
| Type | Description |
|---|---|
List[Dict[str, Any]]
|
The list of award records. |
Raises:
| Type | Description |
|---|---|
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |
Source code in signtraker/credits.py
create_award ¶
Create a credit award.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
award
|
Dict[str, Any]
|
The award payload. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The created award record. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the payload is invalid. |
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |