Skip to content

_users

ContributionsDetails

Bases: HordeAPIObjectBaseModel

How many images and megapixelsteps this user has generated.

v2 API Model: ContributionsDetails

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class ContributionsDetails(HordeAPIObjectBaseModel):
    """How many images and megapixelsteps this user has generated.

    v2 API Model: ContributionsDetails
    """

    fulfillments: int | None = Field(
        default=None,
    )
    """How many images this user has generated."""
    megapixelsteps: float | None = Field(
        default=None,
    )
    """How many megapixelsteps this user has generated."""

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

fulfillments class-attribute instance-attribute

fulfillments: int | None = Field(default=None)

How many images this user has generated.

megapixelsteps class-attribute instance-attribute

megapixelsteps: float | None = Field(default=None)

How many megapixelsteps this user has generated.

get_api_model_name classmethod

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

UserKudosDetails

Bases: HordeAPIObjectBaseModel

The details of the kudos this user has accumulated, used, sent and received.

v2 API Model: UserKudosDetails

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class UserKudosDetails(HordeAPIObjectBaseModel):
    """The details of the kudos this user has accumulated, used, sent and received.

    v2 API Model: UserKudosDetails
    """

    accumulated: float | None = Field(0)
    """The amount of Kudos accumulated or used for generating images."""

    admin: float | None = Field(0)
    """The amount of Kudos this user has been given by the Horde admins."""

    awarded: float | None = Field(0)
    """The amount of Kudos this user has been awarded from things like rating images."""

    gifted: float | None = Field(0)
    """The amount of Kudos this user has given to other users."""

    received: float | None = Field(0)
    """The amount of Kudos this user has been given by other users."""

    donated: float | None = Field(0)
    """The amount of Kudos this user has donated to support education accounts."""

    recurring: float | None = Field(0)
    """The amount of Kudos this user has received from recurring rewards."""

    styled: float | None = Field(0)
    """The amount of Kudos this user has received from styling images."""

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

accumulated class-attribute instance-attribute

accumulated: float | None = Field(0)

The amount of Kudos accumulated or used for generating images.

admin class-attribute instance-attribute

admin: float | None = Field(0)

The amount of Kudos this user has been given by the Horde admins.

awarded class-attribute instance-attribute

awarded: float | None = Field(0)

The amount of Kudos this user has been awarded from things like rating images.

gifted class-attribute instance-attribute

gifted: float | None = Field(0)

The amount of Kudos this user has given to other users.

received class-attribute instance-attribute

received: float | None = Field(0)

The amount of Kudos this user has been given by other users.

donated class-attribute instance-attribute

donated: float | None = Field(0)

The amount of Kudos this user has donated to support education accounts.

recurring class-attribute instance-attribute

recurring: float | None = Field(0)

The amount of Kudos this user has received from recurring rewards.

styled class-attribute instance-attribute

styled: float | None = Field(0)

The amount of Kudos this user has received from styling images.

get_api_model_name classmethod

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

MonthlyKudos

Bases: HordeAPIObjectBaseModel

The details of the monthly kudos this user receives.

v2 API Model: MonthlyKudos

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class MonthlyKudos(HordeAPIObjectBaseModel):
    """The details of the monthly kudos this user receives.

    v2 API Model: MonthlyKudos
    """

    amount: int | None = Field(default=None)
    """How much recurring Kudos this user receives monthly."""

    last_received: datetime | None = Field(default=None)
    """Last date this user received monthly Kudos."""

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

amount class-attribute instance-attribute

amount: int | None = Field(default=None)

How much recurring Kudos this user receives monthly.

last_received class-attribute instance-attribute

last_received: datetime | None = Field(default=None)

Last date this user received monthly Kudos.

get_api_model_name classmethod

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

UserThingRecords

Bases: HordeAPIObjectBaseModel

How many images, texts, megapixelsteps and tokens this user has generated or requested.

v2 API Model: UserThingRecords

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class UserThingRecords(HordeAPIObjectBaseModel):
    """How many images, texts, megapixelsteps and tokens this user has generated or requested.

    v2 API Model: UserThingRecords
    """

    megapixelsteps: float | None = Field(0)
    """How many megapixelsteps this user has generated or requested."""

    tokens: int | None = Field(0)
    """How many token this user has generated or requested."""

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

megapixelsteps class-attribute instance-attribute

megapixelsteps: float | None = Field(0)

How many megapixelsteps this user has generated or requested.

tokens class-attribute instance-attribute

tokens: int | None = Field(0)

How many token this user has generated or requested.

get_api_model_name classmethod

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

UserAmountRecords

Bases: HordeAPIObjectBaseModel

How many images, texts, megapixelsteps and tokens this user has generated or requested.

v2 API Model: UserAmountRecords

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class UserAmountRecords(HordeAPIObjectBaseModel):
    """How many images, texts, megapixelsteps and tokens this user has generated or requested.

    v2 API Model: UserAmountRecords
    """

    image: int | None = Field(0)
    """How many images this user has generated or requested."""

    interrogation: int | None = Field(0)
    """How many texts this user has generated or requested."""

    text: int | None = Field(0)
    """How many texts this user has generated or requested."""

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

image class-attribute instance-attribute

image: int | None = Field(0)

How many images this user has generated or requested.

interrogation class-attribute instance-attribute

interrogation: int | None = Field(0)

How many texts this user has generated or requested.

text class-attribute instance-attribute

text: int | None = Field(0)

How many texts this user has generated or requested.

get_api_model_name classmethod

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

UserRecords

Bases: HordeAPIObjectBaseModel

How many images, texts, megapixelsteps, tokens and styles this user has generated, requested or has had used.

v2 API Model: UserRecords

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class UserRecords(HordeAPIObjectBaseModel):
    """How many images, texts, megapixelsteps, tokens and styles this user has generated, requested or has had used.

    v2 API Model: UserRecords
    """

    contribution: UserThingRecords | None = None
    """How much this user has contributed."""
    fulfillment: UserAmountRecords | None = None
    """How much this user has fulfilled."""
    request: UserAmountRecords | None = None
    """How much this user has requested."""
    usage: UserThingRecords | None = None
    """How much this user has used."""
    style: UserAmountRecords | None = None
    """How much this user's styles have been used."""

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

contribution class-attribute instance-attribute

contribution: UserThingRecords | None = None

How much this user has contributed.

fulfillment class-attribute instance-attribute

fulfillment: UserAmountRecords | None = None

How much this user has fulfilled.

request class-attribute instance-attribute

request: UserAmountRecords | None = None

How much this user has requested.

usage class-attribute instance-attribute

usage: UserThingRecords | None = None

How much this user has used.

style class-attribute instance-attribute

style: UserAmountRecords | None = None

How much this user's styles have been used.

get_api_model_name classmethod

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

UsageDetails

Bases: HordeAPIObjectBaseModel

How many images and megapixelsteps this user has requested.

v2 API Model: UsageDetails

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class UsageDetails(HordeAPIObjectBaseModel):
    """How many images and megapixelsteps this user has requested.

    v2 API Model: UsageDetails
    """

    megapixelsteps: float | None = Field(default=None)
    """How many megapixelsteps this user has requested."""

    requests: int | None = Field(default=None)
    """How many images this user has requested."""

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

megapixelsteps class-attribute instance-attribute

megapixelsteps: float | None = Field(default=None)

How many megapixelsteps this user has requested.

requests class-attribute instance-attribute

requests: int | None = Field(default=None)

How many images this user has requested.

get_api_model_name classmethod

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

ActiveGenerations

Bases: HordeAPIObjectBaseModel

A list of generations that are currently active for this user.

v2 API Model: ActiveGenerations

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
@Unhashable
@Unequatable
class ActiveGenerations(HordeAPIObjectBaseModel):
    """A list of generations that are currently active for this user.

    v2 API Model: ActiveGenerations
    """

    """A list of generations that are currently active for this user."""

    text: list[UUID_Identifier] | None = None
    """The IDs of the text generations that are currently active for this user."""

    image: list[UUID_Identifier] | None = None
    """The IDs of the image generations that are currently active for this user."""

    alchemy: list[UUID_Identifier] | None = None
    """The IDs of the alchemy generations that are currently active for this user."""

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

text class-attribute instance-attribute

text: list[UUID_Identifier] | None = None

The IDs of the text generations that are currently active for this user.

image class-attribute instance-attribute

image: list[UUID_Identifier] | None = None

The IDs of the image generations that are currently active for this user.

alchemy class-attribute instance-attribute

alchemy: list[UUID_Identifier] | None = None

The IDs of the alchemy generations that are currently active for this user.

get_api_model_name classmethod

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

UserDetailsResponse

Bases: HordeResponseBaseModel

The details of a user.

v2 API Model: UserDetails

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
@Unhashable
@Unequatable
class UserDetailsResponse(HordeResponseBaseModel):
    """The details of a user.

    v2 API Model: UserDetails
    """

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

    active_generations: ActiveGenerations | None = None
    """The active generations this user has requested."""

    admin_comment: str | None = Field(
        default=None,
    )
    """(Privileged) Comments from the horde admins about this user."""

    account_age: int | None = Field(
        default=None,
        examples=[60],
    )
    """How many seconds since this account was created."""

    concurrency: int | None = Field(
        default=None,
    )
    """How many concurrent generations this user may request."""

    contact: str | None = Field(
        default=None,
        examples=["email@examples.com"],
    )
    """(Privileged) Contact details for the horde admins to reach the user in case of emergency."""

    contributions: ContributionsDetails | None = None
    """How many images and megapixelsteps this user has generated."""

    customizer: bool | None = Field(
        default=None,
        examples=[False],
    )
    """If this user can run custom models."""

    evaluating_kudos: float | None = Field(
        default=None,
        description=(
            "(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime. When"
            " this number reaches a pre-specified threshold, they automatically become trusted."
        ),
    )
    """(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime.
    When this number reaches a pre-specified threshold, they automatically become trusted."""

    flagged: bool | None = Field(
        default=None,
        examples=[False],
    )
    """This user has been flagged for suspicious activity."""

    id_: int | None = Field(default=None, alias="id")
    """The user unique ID. It is always an integer."""

    kudos: float | None = Field(
        default=None,
        description=(
            "The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image"
            " generations."
        ),
    )
    """The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image
    generations."""

    kudos_details: UserKudosDetails | None = None
    """How much Kudos this user has accumulated or used for generating images."""

    moderator: bool | None = Field(default=None, examples=[False])
    """This user is a Horde moderator."""

    monthly_kudos: MonthlyKudos | None = None
    """How much recurring Kudos this user receives monthly."""

    pseudonymous: bool | None = Field(
        default=None,
        examples=[False],
    )
    """If true, this user has not registered using an oauth service."""

    records: UserRecords | None = None
    """How many images, texts, megapixelsteps and tokens this user has generated or requested."""

    sharedkey_ids: list[str] | None = None
    """The IDs of the shared keys this user has access to."""

    service: bool | None = Field(
        default=None,
        examples=[False],
    )
    """This user is a Horde service account and can provide the `proxied_user` field."""

    special: bool | None = Field(
        default=None,
        examples=[False],
    )
    """(Privileged) This user has been given the Special role."""

    suspicious: int | None = Field(
        default=None,
        examples=[0],
    )
    """(Privileged) How much suspicion this user has accumulated."""

    trusted: bool | None = Field(
        default=None,
        examples=[False],
    )
    """This user is a trusted member of the Horde."""

    usage: UsageDetails | None = None
    """How many images and megapixelsteps this user has requested."""

    username: str | None = Field(
        default=None,
    )
    """The user's unique Username. It is a combination of their chosen alias plus their ID."""

    vpn: bool | None = Field(
        default=None,
        examples=[False],
    )
    """(Privileged) This user has been given the VPN role."""

    education: bool | None = Field(
        default=None,
        examples=[False],
    )
    """(This user has been given the education role."""

    worker_count: int | None = Field(
        default=None,
    )
    """How many workers this user has created (active or inactive)."""

    worker_ids: list[str] | None = None
    """The IDs of the workers this user has created (active or inactive)."""

    worker_invited: int | None = Field(
        default=None,
        description=(
            "Whether this user has been invited to join a worker to the horde and how many of them. When 0, this user"
            " cannot add (new) workers to the horde."
        ),
    )
    """Whether this user has been invited to join a worker to the horde and how many of them.
    When 0, this user cannot add (new) workers to the horde."""

    styles: list[ResponseModelStylesUser] | None = None
    """The styles this user has created."""

active_generations class-attribute instance-attribute

active_generations: ActiveGenerations | None = None

The active generations this user has requested.

admin_comment class-attribute instance-attribute

admin_comment: str | None = Field(default=None)

(Privileged) Comments from the horde admins about this user.

account_age class-attribute instance-attribute

account_age: int | None = Field(default=None, examples=[60])

How many seconds since this account was created.

concurrency class-attribute instance-attribute

concurrency: int | None = Field(default=None)

How many concurrent generations this user may request.

contact class-attribute instance-attribute

contact: str | None = Field(default=None, examples=['email@examples.com'])

(Privileged) Contact details for the horde admins to reach the user in case of emergency.

contributions class-attribute instance-attribute

contributions: ContributionsDetails | None = None

How many images and megapixelsteps this user has generated.

customizer class-attribute instance-attribute

customizer: bool | None = Field(default=None, examples=[False])

If this user can run custom models.

evaluating_kudos class-attribute instance-attribute

evaluating_kudos: float | None = Field(default=None, description='(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime. When this number reaches a pre-specified threshold, they automatically become trusted.')

(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime. When this number reaches a pre-specified threshold, they automatically become trusted.

flagged class-attribute instance-attribute

flagged: bool | None = Field(default=None, examples=[False])

This user has been flagged for suspicious activity.

id_ class-attribute instance-attribute

id_: int | None = Field(default=None, alias='id')

The user unique ID. It is always an integer.

kudos class-attribute instance-attribute

kudos: float | None = Field(default=None, description='The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image generations.')

The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image generations.

kudos_details class-attribute instance-attribute

kudos_details: UserKudosDetails | None = None

How much Kudos this user has accumulated or used for generating images.

moderator class-attribute instance-attribute

moderator: bool | None = Field(default=None, examples=[False])

This user is a Horde moderator.

monthly_kudos class-attribute instance-attribute

monthly_kudos: MonthlyKudos | None = None

How much recurring Kudos this user receives monthly.

pseudonymous class-attribute instance-attribute

pseudonymous: bool | None = Field(default=None, examples=[False])

If true, this user has not registered using an oauth service.

records class-attribute instance-attribute

records: UserRecords | None = None

How many images, texts, megapixelsteps and tokens this user has generated or requested.

sharedkey_ids class-attribute instance-attribute

sharedkey_ids: list[str] | None = None

The IDs of the shared keys this user has access to.

service class-attribute instance-attribute

service: bool | None = Field(default=None, examples=[False])

This user is a Horde service account and can provide the proxied_user field.

special class-attribute instance-attribute

special: bool | None = Field(default=None, examples=[False])

(Privileged) This user has been given the Special role.

suspicious class-attribute instance-attribute

suspicious: int | None = Field(default=None, examples=[0])

(Privileged) How much suspicion this user has accumulated.

trusted class-attribute instance-attribute

trusted: bool | None = Field(default=None, examples=[False])

This user is a trusted member of the Horde.

usage class-attribute instance-attribute

usage: UsageDetails | None = None

How many images and megapixelsteps this user has requested.

username class-attribute instance-attribute

username: str | None = Field(default=None)

The user's unique Username. It is a combination of their chosen alias plus their ID.

vpn class-attribute instance-attribute

vpn: bool | None = Field(default=None, examples=[False])

(Privileged) This user has been given the VPN role.

education class-attribute instance-attribute

education: bool | None = Field(default=None, examples=[False])

(This user has been given the education role.

worker_count class-attribute instance-attribute

worker_count: int | None = Field(default=None)

How many workers this user has created (active or inactive).

worker_ids class-attribute instance-attribute

worker_ids: list[str] | None = None

The IDs of the workers this user has created (active or inactive).

worker_invited class-attribute instance-attribute

worker_invited: int | None = Field(default=None, description='Whether this user has been invited to join a worker to the horde and how many of them. When 0, this user cannot add (new) workers to the horde.')

Whether this user has been invited to join a worker to the horde and how many of them. When 0, this user cannot add (new) workers to the horde.

styles class-attribute instance-attribute

styles: list[ResponseModelStylesUser] | None = None

The styles this user has created.

get_api_model_name classmethod

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

ListUsersDetailsResponse

Bases: HordeResponseRootModel[list[UserDetailsResponse]]

The response for a list of user details.

v2 API Model: _ANONYMOUS_MODEL

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
@Unhashable
@Unequatable
class ListUsersDetailsResponse(HordeResponseRootModel[list[UserDetailsResponse]]):
    """The response for a list of user details.

    v2 API Model: _ANONYMOUS_MODEL
    """

    root: list[UserDetailsResponse]
    """The underlying list of user details."""

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

root instance-attribute

root: list[UserDetailsResponse]

The underlying list of user details.

get_api_model_name classmethod

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

ListUsersDetailsRequest

Bases: BaseAIHordeRequest

Represents a request to list all users.

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class ListUsersDetailsRequest(BaseAIHordeRequest):
    """Represents a request to list all users."""

    page: int
    """The page number to request. There are up to 25 users per page."""

    sort: str = "kudos"
    """The field to sort the users by. The default is by kudos."""

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

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

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

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

    @override
    @classmethod
    def get_query_fields(cls) -> list[str]:
        return ["page", "sort"]

page instance-attribute

page: int

The page number to request. There are up to 25 users per page.

sort class-attribute instance-attribute

sort: str = 'kudos'

The field to sort the users by. The default is by kudos.

get_api_model_name classmethod

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

get_http_method classmethod

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

get_api_endpoint_subpath classmethod

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

get_default_success_response_type classmethod

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

get_query_fields classmethod

get_query_fields() -> list[str]
Source code in horde_sdk/ai_horde_api/apimodels/_users.py
@override
@classmethod
def get_query_fields(cls) -> list[str]:
    return ["page", "sort"]

SingleUserDetailsRequest

Bases: BaseAIHordeRequest, RequestSpecifiesUserIDMixin

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class SingleUserDetailsRequest(BaseAIHordeRequest, RequestSpecifiesUserIDMixin):
    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

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

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

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

get_api_model_name classmethod

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

get_http_method classmethod

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

get_api_endpoint_subpath classmethod

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

get_default_success_response_type classmethod

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

ModifyUser

Bases: _ModifyUserBase

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class ModifyUser(_ModifyUserBase):
    kudos: float | None = Field(default=None)
    """The amount of kudos to modify (can be negative)."""

    reset_suspicion: bool | None = Field(default=None)
    """Set the user's suspicion back to 0."""

kudos class-attribute instance-attribute

kudos: float | None = Field(default=None)

The amount of kudos to modify (can be negative).

reset_suspicion class-attribute instance-attribute

reset_suspicion: bool | None = Field(default=None)

Set the user's suspicion back to 0.

ModifyUserReply

Bases: _ModifyUserBase

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class ModifyUserReply(_ModifyUserBase):
    new_kudos: float | None = Field(default=None)
    """The new amount of kudos this user has."""
    new_suspicion: int | None = Field(default=None)
    """The new amount of suspicion this user has."""

new_kudos class-attribute instance-attribute

new_kudos: float | None = Field(default=None)

The new amount of kudos this user has.

new_suspicion class-attribute instance-attribute

new_suspicion: int | None = Field(default=None)

The new amount of suspicion this user has.

ModifyUserResponse

Bases: HordeResponseBaseModel, ModifyUserReply

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class ModifyUserResponse(HordeResponseBaseModel, ModifyUserReply):
    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModifyUser"

get_api_model_name classmethod

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

ModifyUserRequest

Bases: BaseAIHordeRequest, RequestSpecifiesUserIDMixin, ModifyUser, APIKeyAllowedInRequestMixin

Source code in horde_sdk/ai_horde_api/apimodels/_users.py
class ModifyUserRequest(
    BaseAIHordeRequest,
    RequestSpecifiesUserIDMixin,
    ModifyUser,
    APIKeyAllowedInRequestMixin,
):
    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModifyUserInput"

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

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

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

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

get_api_model_name classmethod

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

get_http_method classmethod

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

get_api_endpoint_subpath classmethod

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

get_default_success_response_type classmethod

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

is_api_key_required classmethod

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