Skip to content

horde_sdk.ai_horde_api.apimodels.find_user

FindUserRequest

Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin

Request to find a user by their API key.

This is useful for frontend applications first confirming that a user is registered with the Horde.

Represents a GET request to the /v2/find_user endpoint.

Source code in horde_sdk/ai_horde_api/apimodels/find_user.py
class FindUserRequest(BaseAIHordeRequest, APIKeyAllowedInRequestMixin):
    """Request to find a user by their API key.

    This is useful for frontend applications first confirming that a user is registered with the Horde.

    Represents a GET request to the /v2/find_user endpoint.
    """

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

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

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

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

get_api_model_name classmethod

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

get_api_endpoint_subpath classmethod

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

get_http_method classmethod

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

get_default_success_response_type classmethod

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