Skip to content

horde_sdk.ai_horde_api.apimodels.kudos

KudosTransferResponse

Bases: HordeResponseBaseModel

The transferred amount of Kudos.

Represents the data returned from the /v2/kudos/transfer endpoint with http status code 200.

v2 API Model: KudosTransferred

Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
class KudosTransferResponse(HordeResponseBaseModel):
    """The transferred amount of Kudos.

    Represents the data returned from the /v2/kudos/transfer endpoint with http status code 200.

    v2 API Model: `KudosTransferred`
    """

    transferred: float | None = None
    """The amount of Kudos transferred."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "KudosTransferred"

transferred class-attribute instance-attribute

transferred: float | None = None

The amount of Kudos transferred.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "KudosTransferred"

KudosTransferRequest

Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin

Request to transfer Kudos to another user. Be sure to use their entire username (e.g., db0#1).

Represents a POST request to the /v2/kudos/transfer endpoint.

v2 API Model: _ANONYMOUS_MODEL

Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
class KudosTransferRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Request to transfer Kudos to another user. Be sure to use their entire username (e.g., db0#1).

    Represents a POST request to the /v2/kudos/transfer endpoint.

    v2 API Model: `_ANONYMOUS_MODEL`
    """

    username: str
    """The username of the user to transfer Kudos to, including the '#'. For example, 'db0#1'."""
    amount: float
    """The amount of Kudos to transfer."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return _ANONYMOUS_MODEL

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.POST

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_kudos_transfer

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[KudosTransferResponse]:
        return KudosTransferResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

username instance-attribute

username: str

The username of the user to transfer Kudos to, including the '#'. For example, 'db0#1'.

amount instance-attribute

amount: float

The amount of Kudos to transfer.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return _ANONYMOUS_MODEL

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.POST

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_kudos_transfer

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[KudosTransferResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[KudosTransferResponse]:
    return KudosTransferResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True

KudosAwardResponse

Bases: HordeResponseBaseModel

The awarded amount of Kudos.

Represents the data returned from the /v2/kudos/award endpoint with http status code 200.

v2 API Model: KudosAwarded

Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
class KudosAwardResponse(HordeResponseBaseModel):
    """The awarded amount of Kudos.

    Represents the data returned from the /v2/kudos/award endpoint with http status code 200.

    v2 API Model: `KudosAwarded`
    """

    awarded: float | None = None
    """The amount of Kudos awarded."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "KudosAwarded"

awarded class-attribute instance-attribute

awarded: float | None = None

The amount of Kudos awarded.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "KudosAwarded"

KudosAwardRequest

Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin

Request to award Kudos to another user. Be sure to use their entire username (e.g., db0#1).

This is a privileged endpoint that requires an admin API key.

Represents a POST request to the /v2/kudos/award endpoint.

v2 API Model: _ANONYMOUS_MODEL

Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
class KudosAwardRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Request to award Kudos to another user. Be sure to use their entire username (e.g., db0#1).

    This is a privileged endpoint that requires an admin API key.

    Represents a POST request to the /v2/kudos/award endpoint.

    v2 API Model: `_ANONYMOUS_MODEL`
    """

    username: str
    """The username of the user to award Kudos to."""
    amount: float
    """The amount of Kudos to award."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return _ANONYMOUS_MODEL

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.POST

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_kudos_award

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[KudosAwardResponse]:
        return KudosAwardResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

username instance-attribute

username: str

The username of the user to award Kudos to.

amount instance-attribute

amount: float

The amount of Kudos to award.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return _ANONYMOUS_MODEL

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.POST

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_kudos_award

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[KudosAwardResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[KudosAwardResponse]:
    return KudosAwardResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True