Module resonitepy.classes

This module define some of the Resonite API json responce under usable python classes.

Expand source code
"""
This module define some of the Resonite API json
responce under usable python classes.
"""

from dataclasses import dataclass, field
from datetime import datetime
from enum import Enum
from pathlib import PureWindowsPath
from typing import List, Optional

from resonitepy.secrets import generate
from resonitepy.exceptions import ResoniteException

from urllib.parse import ParseResult


class RecordType(Enum):
    """ Enum representing the type of a Resonite record.
    """

    OBJECT = "object"
    """Represents an object record."""
    LINK = "link"
    """Represents a link record."""
    DIRECTORY = "directory"
    """Represents a directory record."""
    WORLD = "world"
    """Represents a world record."""
    TEXTURE = "texture"
    """Represents a texture record."""
    AUDIO = "audio"
    """Represents an audio record."""


@dataclass
class ResoniteRecordVersion:
    """ Data class representing the version of a Resonite record.
    """

    globalVersion: int
    """The global version of the record."""
    localVersion: int
    """The local version of the record."""
    lastModifyingUserId: Optional[str]
    """The ID of the user who last modified the record. (optional)"""
    lastModifyingMachineId: Optional[str]
    """The ID of the machine that last modified the record. (optional"""

@dataclass
class ResoniteRecord:
    """ Data class representing a Resonite record.
    """

    id: str
    """The ID of the record."""
    assetUri: Optional[str]
    """The URI of the asset associated with the record."""
    version: ResoniteRecordVersion
    """The version of the record."""
    name: str
    """The name of the record."""
    recordType: RecordType
    """The type of the record."""
    ownerName: str
    """The name of the owner of the record."""
    path: Optional[str]
    """The path of the record."""
    thumbnailUri: Optional[str]
    """The URI of the thumbnail associated with the record."""
    isPublic: bool
    """Whether the record is public."""
    isForPatrons: bool
    """Whether the record is for patrons."""
    isListed: bool
    """Whether the record is listed."""
    isDeleted: bool
    """Whether the record is deleted."""
    tags: Optional[list]
    """The tags associated with the record."""
    creationTime: Optional[datetime]
    """The creation time of the record."""
    lastModificationTime: datetime
    """The last modification time of the record."""
    randomOrder: int
    """The random order of the record."""
    visits: int
    """The number of visits to the record."""
    rating: int
    """The rating of the record."""
    ownerId: str
    """The ID of the owner of the record."""


@dataclass
class ResoniteLink(ResoniteRecord):
    """ Data class representing a Resonite link.
    """

    assetUri: ParseResult
    """The parsed URI of the asset associated with the link."""


@dataclass
class ResoniteDirectory(ResoniteRecord):
    """ Data class representing a Resonite directory.
    """

    lastModifyingMachineId: Optional[str]
    """The ID of the machine that last modified the directory."""
    ownerName: str
    """The name of the owner of the directory."""
    tags: List[str]
    """The tags associated with the directory."""
    creationTime: Optional[datetime]
    """The creation time of the directory."""

    @property
    def content_path(self) -> str:
        """The path of the content within the directory."""
        return str(PureWindowsPath(self.path, self.name))


@dataclass
class ResoniteObject(ResoniteRecord):
    """ Data class representing a Resonite object.
    """

    assetUri: str
    """The URI of the asset associated with the object."""
    lastModifyingMachineId: Optional[str]
    """ The ID of the machine that last modified the object."""
    ownerName: str
    """The name of the owner of the object."""
    tags: List[str]
    """The tags associated with the object."""
    creationTime: datetime
    """The creation time of the object."""

@dataclass
class ResoniteWorld(ResoniteRecord):
    """ Data class representing a Resonite world.
    """
    pass

@dataclass
class ResoniteTexture(ResoniteRecord):
    """ Data class representing a Resonite texture.
    """
    pass

@dataclass
class ResoniteAudio(ResoniteRecord):
    """ Data class representing a Resonite audio.
    """
    pass


recordTypeMapping = {
    RecordType.DIRECTORY: ResoniteDirectory,
    RecordType.LINK: ResoniteLink,
    RecordType.OBJECT: ResoniteObject,
    RecordType.WORLD: ResoniteWorld,
    RecordType.TEXTURE: ResoniteTexture,
    RecordType.AUDIO: ResoniteAudio,
}


@dataclass
class LoginDetailsAuth:
    """ Data class representing a login details for authentication.
    """

    password: str
    """The password for authentication."""

    def build_dict(self):
        """ Returns a dictionary representation of the login details.

        Returns:
            dict: A dictionary containing the login details.

        Example:
            >>> LoginDetailsAuth("my_password").build_dict()
            {'$type': 'password', 'password': 'my_password', 'recoveryCode': None}
        """
        return {
            "$type": "password",
            "password": self.password,
            "recoveryCode": None
        }


@dataclass
class LoginDetails:
    """ Data class representing a login details.

    Raises:
        ResoniteException: If neither ownerId, username, nor email is provided during post-initialization.
        ResoniteException: If authentication details are not provided during post-initialization.
    """

    authentication: LoginDetailsAuth
    """The authentication details for the login."""
    ownerId: Optional[str] = None
    """The ownerId of the login which should start with an `U-`."""
    username: Optional[str] = None
    """The username of the login."""
    email: Optional[str] = None
    """The email of the login."""
    secretMachineId: str = field(default_factory=generate)
    """The secret machine ID for the login. See the generate class in the resonite.secrets module."""
    rememberMe: Optional[str] = False
    """The remember me option for the login."""

    def __post_init__(self):
        """ Performs post-initialization checks for a class instance."""
        if not self.ownerId and not self.username and not self.email:
            raise ResoniteException(
                'Either an ownerId, an username or an email is needed')
        if not self.authentication:
            raise ResoniteException('A password is needed')


@dataclass
class ProfileData:
    """ Data class representing a profile data.
    """

    iconUrl: Optional[str]
    """The URL of the profile icon."""
    tokenOutOut: Optional[List[str]]
    """The list of token outputs."""
    displayBadges: Optional[list]
    """The list of display badges."""
    tagline: Optional[str]
    """The tagline of the profile."""
    description: Optional[str]
    """The description of the profile."""


@dataclass
class Snapshot:
    """ Data class representing a snapshot of data.
    """

    totalCents: int
    """The total cents."""
    patreonRawCents: int
    """The raw cents from Patreon."""
    deltaCents: int
    """The delta cents."""
    pledgeCents: int
    """The pledge cents."""
    email: str
    """The email associated with the snapshot."""
    timestamp: str
    """The timestamp of the snapshot."""

@dataclass
class PatreonData:
    """ Data class representing a Patreon data.
    """

    isPatreonSupporter: bool
    """Whether the user is a Patreon supporter."""
    patreonId: Optional[str]
    """The Patreon ID of the user."""
    lastPatreonEmail: str
    """The last Patreon email associated with the user."""
    snapshots: List[Snapshot]
    """A list of snapshots associated with the user."""
    lastPatreonPledgeCents: int
    """The last Patreon pledge amount in cents."""
    lastTotalCents: int
    """The last total amount in cents."""
    minimumTotalUnits: int
    """The minimum total units."""
    externalCents: int
    """The external amount in cents."""
    lastExternalCents: int
    """The last external amount in cents."""
    hasSupported: bool
    """Whether the user has supported."""
    lastIsAnorak: Optional[bool] # Deprecated
    """Deprecated"""
    priorityIssue: int
    """The priority issue."""
    lastPlusActivationTime: Optional[datetime] # Depreacted
    """Deprecated"""
    lastActivationTime: Optional[datetime] # Deprecated
    """Deprecated"""
    lastPlusPledgeAmount: Optional[int] # Deprecated
    """Deprecated"""
    lastPaidPledgeAmount: int
    """The last paid pledge amount."""
    accountName: Optional[str] # Deprecated
    """Deprecated"""
    currentAccountType: Optional[int] # Deprecated
    """Deprecated"""
    currentAccountCents: Optional[int] # Deprecated
    """Deprecated"""
    pledgedAccountType: Optional[int] # Deprecated
    """Deprecated"""


@dataclass
class QuotaBytesSources:
    """ Data class representing the quota bytes sources.
    """

    base: int
    """The base quota bytes."""
    patreon: int
    """The Patreon quota bytes."""
    paid: int
    """The paid quota bytes."""
    mmc21_honorary: int
    """The MMC21 honorary quota bytes."""


@dataclass
class ResoniteUserQuotaBytesSources:
    """ Data class representing the quota bytes sources for a Resonite user.
    """

    base: int
    """The base quota bytes."""
    patreon: Optional[int]
    """The Patreon quota bytes."""


@dataclass
class ResoniteUserMigrationData:
    """ Data class representing the migration data for a Resonite user.
    """

    username: str
    """The username of the user."""
    email: str
    """The email of the user."""
    userId: str
    """The ID of the user."""
    quotaBytes: int
    """The quota bytes of the user."""
    usedBytes: int
    """The used bytes of the user."""
    patreonData: PatreonData
    """ The Patreon data of the user."""
    quotaBytesSources: Optional[ResoniteUserQuotaBytesSources]
    """The quota bytes sources of the user."""
    registrationDate: datetime
    """The registration date of the user."""


@dataclass
class ResoniteUserEntitlementShoutOut:
    """ Data class representing an entitlement shout-out for a Resonite user.
    """

    shoutoutType: str
    """The type of the shout-out."""
    friendlyDescription: str
    """The friendly description of the shout-out."""


@dataclass
class ResoniteUserEntitlementCredits:
    """ Data class representingan entitlement credit for a Resonite user.
    """

    creditType: str
    """The type of the credit."""
    friendlyDescription: str
    """The friendly description of the credit."""


@dataclass
class ResoniteUserEntitlementGroupCreation:
    """ Data class representing the entitlement for the group creation for a Resonite user.
    """

    groupCount: int
    """The number of groups the user is entitled to create."""


@dataclass
class ResoniteEntitlementDeleteRecovery:
    """ Data class representing the entitlement for deleting recovery data in Resonite.
    """
    pass


@dataclass
class ResoniteUserEntitlementBadge:
    """ Data class representing an entitlement badge for a Resonite user.
    """

    badgeType: str
    """The type of the badge."""
    badgeCount: int
    """The count of the badge."""


@dataclass
class ResoniteUserEntitlementHeadless:
    """ Data class representing a headless entitlement for a Resonite user.
    """

    friendlyDescription: str
    """The friendly description of the headless entitlement."""


@dataclass
class ResoniteUserEntitlementExitMessage:
    """ Data class representing an exit message entitlement for a Resonite user.
    """

    isLifetime: bool
    """Indicates whether the entitlement is lifetime."""
    messageCount: int
    """The count of exit messages."""
    friendlyDescription: str
    """The friendly description of the exit message entitlement."""


@dataclass
class ResoniteUserEntitlementStorageSpace:
    """ Data class representing a storage space entitlement for a Resonite user.
    """

    bytes: int
    """The amount of storage space in bytes."""
    maximumShareLevel: int
    """The maximum share level."""
    storageId: str
    """The ID of the storage space."""
    group: str
    """The group associated with the storage space."""
    startsOn: datetime
    """The start date of the entitlement."""
    expiresOn: datetime
    """The expiration date of the entitlement."""
    name: str
    """The name of the storage space."""
    description: str
    """The description of the storage space."""

resoniteUserEntitlementTypeMapping = {
    'shoutOut': ResoniteUserEntitlementShoutOut,
    'credits': ResoniteUserEntitlementCredits,
    'groupCreation': ResoniteUserEntitlementGroupCreation,
    'deleteRecovery': ResoniteEntitlementDeleteRecovery,
    'badge': ResoniteUserEntitlementBadge,
    'headless': ResoniteUserEntitlementHeadless,
    'exitMessage': ResoniteUserEntitlementExitMessage,
    'storageSpace': ResoniteUserEntitlementStorageSpace,
}


@dataclass
class supporterMetadataPatreon:
    """ Data class representing the Patreon supporter metadata.
    """

    isActiveSupporter: bool
    """Whether the user is an active supporter."""
    totalSupportMonths: int
    """The total number of months of support."""
    totalSupportCents: int
    """The total amount of support in cents."""
    lastTierCents: int
    """The amount of the last tier in cents."""
    highestTierCents: int
    """The amount of the highest tier in cents."""
    lowestTierCents: int
    """The amount of the lowest tier in cents."""
    firstSupportTimestamp: datetime
    """The timestamp of the first support."""
    lastSupportTimestamp: datetime
    """The timestamp of the last support."""


supporterMetadataTypeMapping = {
    'patreon': supporterMetadataPatreon,
}


@dataclass
class ResoniteUser:
    """ Data class representing a Resonite user.
    """

    id: str
    """The ID of the user."""
    username: str
    """The username of the user."""
    normalizedUsername: str
    """The normalized username of the user."""
    email: str
    """The email of the user."""
    registrationDate: datetime
    """The registration date of the user."""
    isVerified: bool
    """Indicates whether the user is verified."""
    isLocked: bool
    """Whether the user is locked."""
    supressBanEvasion: bool
    """Whether ban evasion is suppressed for the user."""
    two_fa_login: bool
    """Whether two-factor authentication is enabled for login."""
    profile: Optional[ProfileData]
    """The profile data of the user."""
    supporterMetadata: Optional[List[
        supporterMetadataPatreon
    ]]
    """The Patreon supporter metadata of the user."""
    entitlements: Optional[List[
        ResoniteUserEntitlementShoutOut |
        ResoniteUserEntitlementCredits |
        ResoniteUserEntitlementGroupCreation |
        ResoniteEntitlementDeleteRecovery |
        ResoniteUserEntitlementBadge |
        ResoniteUserEntitlementHeadless |
        ResoniteUserEntitlementExitMessage |
        ResoniteUserEntitlementStorageSpace
    ]]
    """The entitlements of the user."""
    migratedData: Optional[ResoniteUserMigrationData]
    """The migrated data of the user."""
    tags: Optional[List[str]] = field(default_factory=list)
    """The tags associated with the user."""

@dataclass
class WorldId:
    """ Data class representing a World ID.
    """

    ownerId: str
    """The owner ID of the world. Start with `U-`"""
    recordId: str
    """The record ID of the world."""

@dataclass
class ResoniteSessionUser:
    """ Data class representing a Resonite session user.
    """

    isPresent: bool
    """Whether the user is present."""
    userID: Optional[str]
    """The ID of the user."""
    username: str
    """The username of the user."""
    userSessionId: Optional[str]
    """The session ID of the user."""
    outputDevice: Optional[int]
    """The output device of the user."""

@dataclass
class ResoniteSession:
    """ Data class representing a Resonite session.
    """

    activeSessions: Optional[str]
    """The active sessions."""
    activeUsers: int
    """ The number of active users."""
    compatibilityHash: Optional[str]
    """The compatibility hash."""
    correspondingWorldId: Optional[WorldId]
    """The corresponding world ID."""
    description: Optional[str]
    """The description of the session."""
    hasEnded: bool
    """Whether the session has ended."""
    headlessHost: bool
    """Whether the host is headless."""
    hostMachineId: str
    """The machine ID of the host."""
    hostUserSessionId: str
    """The user session ID of the host."""
    hostUserId: Optional[str]
    """The user ID of the host."""
    hostUsername: str
    """The username of the host."""
    isValid: bool
    """Whether the session is valid."""
    joinedUsers: int
    """The number of joined users."""
    lastUpdate: datetime
    """The timestamp of the last update."""
    maxUsers: int
    """The maximum number of users."""
    mobileFriendly: bool
    """Whether the session is mobile-friendly."""
    name: str
    """The name of the session."""
    appVersion: str
    """The version of the app."""
    normalizedSessionId: str
    """The normalized session ID."""
    sessionBeginTime: datetime
    """The timestamp of the session begin time."""
    sessionId: str
    """The session ID."""
    sessionURLs: List[str]
    """The URLs of the session."""
    sessionUsers: List[ResoniteSessionUser]
    """The users in the session."""
    tags: List[str]
    """The tags associated with the session."""
    thumbnailUrl: Optional[str]
    """The URL of the thumbnail."""
    totalActiveUsers: int
    """The total number of active users."""
    totalJoinedUsers: int
    """The total number of joined users."""
    hideFromListing: bool
    """Whether the session is hidden from listing."""


@dataclass
class PublicRSAKey:
    """ Data class representing a public RSA key.
    """

    Exponent: str
    """The exponent of the RSA key."""
    Modulus: str
    """The modulus of the RSA key."""


class OnlineStatus(Enum):
    """ Enum representing the online status of a Resonite user.
    """

    ONLINE = "Online"
    AWAY = "Away"
    BUSY = "Busy"
    OFFLINE = "Offline"


onlineStatusMapping = {
    OnlineStatus.ONLINE: "Online",
    OnlineStatus.AWAY: "Away",
    OnlineStatus.BUSY: "Busy",
    OnlineStatus.OFFLINE: "Offline",
}


class CurrentResoniteSessionAccessLevel(Enum):
    """ Enum representing the access level of a Resonite session.
    """
    PRIVATE = 0
    """Private access level."""
    LAN = 1
    """LAN access level."""
    FRIENDS = 2
    """Contacts access level."""
    FRIENDSOFFRIENDS = 3
    """Contacts+ access level."""
    REGISTEREDUSERS = 4
    """Registered Users access level."""
    ANYONE = 5
    """Anyone access level."""

    def __str__(self):
        """Returns the string representation of the access level."""
        text = {
            'PRIVATE': 'Private',
            'LAN': 'LAN',
            'FRIENDS': 'Contacts',
            'FRIENDSOFFRIENDS': 'Contacts+',
            'REGISTEREDUSERS': 'Registered Users',
            'ANYONE': 'Anyone'
        }
        return text[self.name]


currentResoniteSessionAccessLevelMapping = {
    CurrentResoniteSessionAccessLevel.PRIVATE: 0,
    CurrentResoniteSessionAccessLevel.LAN: 1,
    CurrentResoniteSessionAccessLevel.FRIENDS: 2,
    CurrentResoniteSessionAccessLevel.FRIENDSOFFRIENDS: 3,
    CurrentResoniteSessionAccessLevel.REGISTEREDUSERS: 4,
    CurrentResoniteSessionAccessLevel.ANYONE: 5,
}


@dataclass
class UserStatusData:
    """ Data class representing an user status data.
    """

    activeSessions: Optional[List[ResoniteSession]]
    """The list of active sessions."""
    currentSession: Optional[ResoniteSession]
    """The current session."""
    compatibilityHash: Optional[str]
    """The compatibility hash."""
    currentHosting: bool
    """Whether the user is currently hosting a session."""
    currentSessionAccessLevel: CurrentResoniteSessionAccessLevel
    """The access level of the current session."""
    currentSessionHidden: bool
    """Whether the current session is hidden."""
    currentSessionId: Optional[str]
    """The ID of the current session."""
    isMobile: bool
    """Whether the user is on a mobile device."""
    lastStatusChange: datetime
    """The timestamp of the last status change."""
    neosVersion: Optional[str]
    """The version of Neos."""
    onlineStatus: OnlineStatus
    """The online status of the user."""
    OutputDevice: Optional[str]
    """The output device of the user."""
    publicRSAKey: Optional[PublicRSAKey]
    """The public RSA key of the user."""

@dataclass
class ResoniteUserStatus:
    """ Data class representing the status of a Resonite user.
    """

    onlineStatus: OnlineStatus
    """The online status of the user."""
    lastStatusChange: datetime
    """The timestamp of the last status change."""
    currentSessionAccessLevel: int
    """The access level of the current session."""
    currentSessionHidden: bool
    """Whether the current session is hidden."""
    currentHosting: bool
    """Whether the user is currently hosting a session."""
    compatibilityHash: Optional[str]
    """The compatibility hash."""
    neosVersion: Optional[str]
    """The version of Neos. """
    publicRSAKey: Optional[PublicRSAKey]
    """The public RSA key."""
    OutputDevice: Optional[str]
    """The output device."""
    isMobile: bool
    """Whether the user is on a mobile device."""

class ContactStatus(Enum):
    """ Enum representing the status of a contact.
    """

    ACCEPTED = "Accepted"
    """The contact request has been accepted."""
    IGNORED = "Ignored"
    """The contact request has been ignored."""
    REQUESTED = "Requested"
    """ The contact request has been sent but not yet accepted."""
    NONE = "None"
    """No contact status."""


contactStatusMapping = {
    ContactStatus.ACCEPTED: "Accepted",
    ContactStatus.IGNORED: "Ignored",
    ContactStatus.REQUESTED: "Requested",
    ContactStatus.NONE: "None",
}


@dataclass
class ResoniteContact:
    id: str
    contactUsername: str
    contactStatus: ContactStatus
    isAccepted: bool
    profile: Optional[ProfileData]
    latestMessageTime: datetime
    isMigrated: bool
    isCounterpartMigrated: bool
    ownerId: str

class ResoniteMessageType(Enum):
    """ Enum representing a Resonite message type.
    """

    TEXT = "Text"
    """Text type message."""
    OBJECT = "Object"
    """Object type message."""
    SOUND = "Sound"
    """Audio type message."""
    SESSIONINVITE = "SessionInvite"
    """Session invite type message."""
    CREDITTRANSFER = "CreditTransfer"
    """Credit transfert type message."""
    SUGARCUBES = "SugarCubes"
    """Sugar cubes type message."""

ResoniteMessageTypeMapping = {
    ResoniteMessageType.TEXT: "Text",
    ResoniteMessageType.OBJECT: "Object",
    ResoniteMessageType.SOUND: "Sound",
    ResoniteMessageType.SESSIONINVITE: "SessionInvite",
    ResoniteMessageType.CREDITTRANSFER: "CreditTransfer",
    ResoniteMessageType.SUGARCUBES: "SugarCubes",
}


class ResoniteMessageContentText(str):
    """ Class representing the content of a Resonite text message.

    This will return directly a string.
    """

    def __new__(cls, *args, **kw):
        return str.__new__(cls, *args, **kw)


@dataclass
class ResoniteMessageContentObject:
    """ Data class representing the content of a Resonite object message.
    """

    id: str
    """The ID of the object."""
    ownerId: str
    """The ID of the object owner."""
    assetUri: str
    """The URI of the object asset."""
    version: Optional[ResoniteRecordVersion]
    """The version of the object record."""
    name: str
    """The name of the object."""
    recordType: RecordType
    """The type of the object record."""
    ownerName: Optional[str]
    """The name of the object owner."""
    tags: List[str]
    """The tags associated with the object."""
    path: Optional[str]
    """The path of the object."""
    thumbnailUri: str
    """The URI of the object thumbnail."""
    isPublic: bool
    """Whether the object is public."""
    isForPatrons: bool
    """Whether the object is for patrons."""
    isListed: bool
    """Whether the object is listed."""
    lastModificationTime: datetime
    """The timestamp of the last modification."""
    creationTime: datetime
    """The timestamp of the creation."""
    firstPublishTime: Optional[datetime]
    """The timestamp of the first publish."""
    isDeleted: Optional[bool]
    """Whether the object is deleted."""
    visits: int
    """The number of visits."""
    rating: float
    """The rating of the object."""
    randomOrder: int
    """The random order of the object."""
    sumbissions: Optional[str]
    """The submissions of the object."""

@dataclass
class ResoniteMessageContentSessionInvite:
    name: str
    description: Optional[str]
    correspondingWorldId: Optional[WorldId]
    tags: List[str]
    sessionId: str
    normalizedSessionId: str
    hostMachineId: str
    hostUsername: str
    compatibilityHash: Optional[str]
    universeId: Optional[str]
    appVersion: Optional[str]
    headlessHost: Optional[bool]
    sessionURLs: List[str]
    parentSessionIds: Optional[List[str]]
    nestedSessionIds: Optional[List[str]]
    sessionUsers: List[ResoniteSessionUser]
    thumbnail: Optional[str]
    joinedUsers: int
    activeUsers: int
    totalActiveUsers: int
    totalJoinedUsers: int
    maxUsers: int
    mobileFriendly: bool
    sessionBeginTime: datetime
    lastUpdate: datetime
    accessLevel: str
    broadcastKey: Optional[str]


@dataclass
class ResoniteMessageContentSound:
    id: str
    OwnerId: Optional[str]
    assetUri: str
    globalVersion: Optional[int]
    localVersion: Optional[int]
    lastModifyingUserId: Optional[str]
    lastModifyingMachineId: Optional[str]
    name: str
    recordType: RecordType
    ownerName: Optional[str]
    tags: List[str]
    path: Optional[str]
    isPublic: bool
    isForPatron: Optional[bool]
    isListed: bool
    lastModificationTime: datetime
    creationTime: datetime
    firstPublishTime: Optional[datetime]
    visits: int
    rating: float
    randomOrder: int
    submissions: Optional[str]
    neosDBmanifest: Optional[list]



@dataclass
class ResoniteMessage:
    """Representation of a Resonite message."""
    id: str
    senderId: str
    ownerId: str
    """The ownerId of a ResoniteMessage should start with `U-`"""
    sendTime: str
    recipientId: str
    messageType: ResoniteMessageType
    senderUserSessionId: Optional[str]
    isMigrated: bool
    readTime: datetime
    otherId: str
    lastUpdateTime: datetime
    content: ResoniteMessageContentText | ResoniteMessageContentSessionInvite | ResoniteMessageContentObject | ResoniteMessageContentSound

@dataclass
class ResoniteCloudVar:
    """Representation of Resonite clound variable."""
    ownerId: str
    """The ownerId of a ResoniteCloudVar should start with `U-`"""
    path: str
    """The path of a ResoniteCloudVar should start with a `U-` for a user owned path and a `G-` for a group owned path."""
    value: Optional[str]
    partitionKey: str
    rowKey: str
    timestamp: Optional[str]
    eTag: Optional[str]


class OwnerType(Enum):
    MACHING = "Machine"
    USER = "User"
    GROUP = "Group"
    INVALID = "Invalid"


@dataclass
class ResoniteCloudVarDefs:
    definitionOwnerId: str
    subpath: str
    variableType: str
    defaultValue: Optional[str]
    deleteScheduled: bool
    readPermissions: List[str]
    writePermissions: List[str]
    listPermissions: List[str]
    partitionKey: str
    rowKey: str
    timestamp: str
    eTag: str

Classes

class ContactStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)

Enum representing the status of a contact.

Expand source code
class ContactStatus(Enum):
    """ Enum representing the status of a contact.
    """

    ACCEPTED = "Accepted"
    """The contact request has been accepted."""
    IGNORED = "Ignored"
    """The contact request has been ignored."""
    REQUESTED = "Requested"
    """ The contact request has been sent but not yet accepted."""
    NONE = "None"
    """No contact status."""

Ancestors

  • enum.Enum

Class variables

var ACCEPTED

The contact request has been accepted.

var IGNORED

The contact request has been ignored.

var NONE

No contact status.

var REQUESTED

The contact request has been sent but not yet accepted.

class CurrentResoniteSessionAccessLevel (value, names=None, *, module=None, qualname=None, type=None, start=1)

Enum representing the access level of a Resonite session.

Expand source code
class CurrentResoniteSessionAccessLevel(Enum):
    """ Enum representing the access level of a Resonite session.
    """
    PRIVATE = 0
    """Private access level."""
    LAN = 1
    """LAN access level."""
    FRIENDS = 2
    """Contacts access level."""
    FRIENDSOFFRIENDS = 3
    """Contacts+ access level."""
    REGISTEREDUSERS = 4
    """Registered Users access level."""
    ANYONE = 5
    """Anyone access level."""

    def __str__(self):
        """Returns the string representation of the access level."""
        text = {
            'PRIVATE': 'Private',
            'LAN': 'LAN',
            'FRIENDS': 'Contacts',
            'FRIENDSOFFRIENDS': 'Contacts+',
            'REGISTEREDUSERS': 'Registered Users',
            'ANYONE': 'Anyone'
        }
        return text[self.name]

Ancestors

  • enum.Enum

Class variables

var ANYONE

Anyone access level.

var FRIENDS

Contacts access level.

var FRIENDSOFFRIENDS

Contacts+ access level.

var LAN

LAN access level.

var PRIVATE

Private access level.

var REGISTEREDUSERS

Registered Users access level.

class LoginDetails (authentication: LoginDetailsAuth, ownerId: Optional[str] = None, username: Optional[str] = None, email: Optional[str] = None, secretMachineId: str = <factory>, rememberMe: Optional[str] = False)

Data class representing a login details.

Raises

ResoniteException
If neither ownerId, username, nor email is provided during post-initialization.
ResoniteException
If authentication details are not provided during post-initialization.
Expand source code
@dataclass
class LoginDetails:
    """ Data class representing a login details.

    Raises:
        ResoniteException: If neither ownerId, username, nor email is provided during post-initialization.
        ResoniteException: If authentication details are not provided during post-initialization.
    """

    authentication: LoginDetailsAuth
    """The authentication details for the login."""
    ownerId: Optional[str] = None
    """The ownerId of the login which should start with an `U-`."""
    username: Optional[str] = None
    """The username of the login."""
    email: Optional[str] = None
    """The email of the login."""
    secretMachineId: str = field(default_factory=generate)
    """The secret machine ID for the login. See the generate class in the resonite.secrets module."""
    rememberMe: Optional[str] = False
    """The remember me option for the login."""

    def __post_init__(self):
        """ Performs post-initialization checks for a class instance."""
        if not self.ownerId and not self.username and not self.email:
            raise ResoniteException(
                'Either an ownerId, an username or an email is needed')
        if not self.authentication:
            raise ResoniteException('A password is needed')

Class variables

var authenticationLoginDetailsAuth

The authentication details for the login.

var email : Optional[str]

The email of the login.

var ownerId : Optional[str]

The ownerId of the login which should start with an U-.

var rememberMe : Optional[str]

The remember me option for the login.

var secretMachineId : str

The secret machine ID for the login. See the generate class in the resonite.secrets module.

var username : Optional[str]

The username of the login.

class LoginDetailsAuth (password: str)

Data class representing a login details for authentication.

Expand source code
@dataclass
class LoginDetailsAuth:
    """ Data class representing a login details for authentication.
    """

    password: str
    """The password for authentication."""

    def build_dict(self):
        """ Returns a dictionary representation of the login details.

        Returns:
            dict: A dictionary containing the login details.

        Example:
            >>> LoginDetailsAuth("my_password").build_dict()
            {'$type': 'password', 'password': 'my_password', 'recoveryCode': None}
        """
        return {
            "$type": "password",
            "password": self.password,
            "recoveryCode": None
        }

Class variables

var password : str

The password for authentication.

Methods

def build_dict(self)

Returns a dictionary representation of the login details.

Returns

dict
A dictionary containing the login details.

Example

>>> LoginDetailsAuth("my_password").build_dict()
{'$type': 'password', 'password': 'my_password', 'recoveryCode': None}
Expand source code
def build_dict(self):
    """ Returns a dictionary representation of the login details.

    Returns:
        dict: A dictionary containing the login details.

    Example:
        >>> LoginDetailsAuth("my_password").build_dict()
        {'$type': 'password', 'password': 'my_password', 'recoveryCode': None}
    """
    return {
        "$type": "password",
        "password": self.password,
        "recoveryCode": None
    }
class OnlineStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)

Enum representing the online status of a Resonite user.

Expand source code
class OnlineStatus(Enum):
    """ Enum representing the online status of a Resonite user.
    """

    ONLINE = "Online"
    AWAY = "Away"
    BUSY = "Busy"
    OFFLINE = "Offline"

Ancestors

  • enum.Enum

Class variables

var AWAY
var BUSY
var OFFLINE
var ONLINE
class OwnerType (value, names=None, *, module=None, qualname=None, type=None, start=1)

An enumeration.

Expand source code
class OwnerType(Enum):
    MACHING = "Machine"
    USER = "User"
    GROUP = "Group"
    INVALID = "Invalid"

Ancestors

  • enum.Enum

Class variables

var GROUP
var INVALID
var MACHING
var USER
class PatreonData (isPatreonSupporter: bool, patreonId: Optional[str], lastPatreonEmail: str, snapshots: List[Snapshot], lastPatreonPledgeCents: int, lastTotalCents: int, minimumTotalUnits: int, externalCents: int, lastExternalCents: int, hasSupported: bool, lastIsAnorak: Optional[bool], priorityIssue: int, lastPlusActivationTime: Optional[datetime.datetime], lastActivationTime: Optional[datetime.datetime], lastPlusPledgeAmount: Optional[int], lastPaidPledgeAmount: int, accountName: Optional[str], currentAccountType: Optional[int], currentAccountCents: Optional[int], pledgedAccountType: Optional[int])

Data class representing a Patreon data.

Expand source code
@dataclass
class PatreonData:
    """ Data class representing a Patreon data.
    """

    isPatreonSupporter: bool
    """Whether the user is a Patreon supporter."""
    patreonId: Optional[str]
    """The Patreon ID of the user."""
    lastPatreonEmail: str
    """The last Patreon email associated with the user."""
    snapshots: List[Snapshot]
    """A list of snapshots associated with the user."""
    lastPatreonPledgeCents: int
    """The last Patreon pledge amount in cents."""
    lastTotalCents: int
    """The last total amount in cents."""
    minimumTotalUnits: int
    """The minimum total units."""
    externalCents: int
    """The external amount in cents."""
    lastExternalCents: int
    """The last external amount in cents."""
    hasSupported: bool
    """Whether the user has supported."""
    lastIsAnorak: Optional[bool] # Deprecated
    """Deprecated"""
    priorityIssue: int
    """The priority issue."""
    lastPlusActivationTime: Optional[datetime] # Depreacted
    """Deprecated"""
    lastActivationTime: Optional[datetime] # Deprecated
    """Deprecated"""
    lastPlusPledgeAmount: Optional[int] # Deprecated
    """Deprecated"""
    lastPaidPledgeAmount: int
    """The last paid pledge amount."""
    accountName: Optional[str] # Deprecated
    """Deprecated"""
    currentAccountType: Optional[int] # Deprecated
    """Deprecated"""
    currentAccountCents: Optional[int] # Deprecated
    """Deprecated"""
    pledgedAccountType: Optional[int] # Deprecated
    """Deprecated"""

Class variables

var accountName : Optional[str]

Deprecated

var currentAccountCents : Optional[int]

Deprecated

var currentAccountType : Optional[int]

Deprecated

var externalCents : int

The external amount in cents.

var hasSupported : bool

Whether the user has supported.

var isPatreonSupporter : bool

Whether the user is a Patreon supporter.

var lastActivationTime : Optional[datetime.datetime]

Deprecated

var lastExternalCents : int

The last external amount in cents.

var lastIsAnorak : Optional[bool]

Deprecated

var lastPaidPledgeAmount : int

The last paid pledge amount.

var lastPatreonEmail : str

The last Patreon email associated with the user.

var lastPatreonPledgeCents : int

The last Patreon pledge amount in cents.

var lastPlusActivationTime : Optional[datetime.datetime]

Deprecated

var lastPlusPledgeAmount : Optional[int]

Deprecated

var lastTotalCents : int

The last total amount in cents.

var minimumTotalUnits : int

The minimum total units.

var patreonId : Optional[str]

The Patreon ID of the user.

var pledgedAccountType : Optional[int]

Deprecated

var priorityIssue : int

The priority issue.

var snapshots : List[Snapshot]

A list of snapshots associated with the user.

class ProfileData (iconUrl: Optional[str], tokenOutOut: Optional[List[str]], displayBadges: Optional[list], tagline: Optional[str], description: Optional[str])

Data class representing a profile data.

Expand source code
@dataclass
class ProfileData:
    """ Data class representing a profile data.
    """

    iconUrl: Optional[str]
    """The URL of the profile icon."""
    tokenOutOut: Optional[List[str]]
    """The list of token outputs."""
    displayBadges: Optional[list]
    """The list of display badges."""
    tagline: Optional[str]
    """The tagline of the profile."""
    description: Optional[str]
    """The description of the profile."""

Class variables

var description : Optional[str]

The description of the profile.

var displayBadges : Optional[list]

The list of display badges.

var iconUrl : Optional[str]

The URL of the profile icon.

var tagline : Optional[str]

The tagline of the profile.

var tokenOutOut : Optional[List[str]]

The list of token outputs.

class PublicRSAKey (Exponent: str, Modulus: str)

Data class representing a public RSA key.

Expand source code
@dataclass
class PublicRSAKey:
    """ Data class representing a public RSA key.
    """

    Exponent: str
    """The exponent of the RSA key."""
    Modulus: str
    """The modulus of the RSA key."""

Class variables

var Exponent : str

The exponent of the RSA key.

var Modulus : str

The modulus of the RSA key.

class QuotaBytesSources (base: int, patreon: int, paid: int, mmc21_honorary: int)

Data class representing the quota bytes sources.

Expand source code
@dataclass
class QuotaBytesSources:
    """ Data class representing the quota bytes sources.
    """

    base: int
    """The base quota bytes."""
    patreon: int
    """The Patreon quota bytes."""
    paid: int
    """The paid quota bytes."""
    mmc21_honorary: int
    """The MMC21 honorary quota bytes."""

Class variables

var base : int

The base quota bytes.

var mmc21_honorary : int

The MMC21 honorary quota bytes.

var paid : int

The paid quota bytes.

var patreon : int

The Patreon quota bytes.

class RecordType (value, names=None, *, module=None, qualname=None, type=None, start=1)

Enum representing the type of a Resonite record.

Expand source code
class RecordType(Enum):
    """ Enum representing the type of a Resonite record.
    """

    OBJECT = "object"
    """Represents an object record."""
    LINK = "link"
    """Represents a link record."""
    DIRECTORY = "directory"
    """Represents a directory record."""
    WORLD = "world"
    """Represents a world record."""
    TEXTURE = "texture"
    """Represents a texture record."""
    AUDIO = "audio"
    """Represents an audio record."""

Ancestors

  • enum.Enum

Class variables

var AUDIO

Represents an audio record.

var DIRECTORY

Represents a directory record.

Represents a link record.

var OBJECT

Represents an object record.

var TEXTURE

Represents a texture record.

var WORLD

Represents a world record.

class ResoniteAudio (id: str, assetUri: Optional[str], version: ResoniteRecordVersion, name: str, recordType: RecordType, ownerName: str, path: Optional[str], thumbnailUri: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, tags: Optional[list], creationTime: Optional[datetime.datetime], lastModificationTime: datetime.datetime, randomOrder: int, visits: int, rating: int, ownerId: str)

Data class representing a Resonite audio.

Expand source code
@dataclass
class ResoniteAudio(ResoniteRecord):
    """ Data class representing a Resonite audio.
    """
    pass

Ancestors

Inherited members

class ResoniteCloudVar (ownerId: str, path: str, value: Optional[str], partitionKey: str, rowKey: str, timestamp: Optional[str], eTag: Optional[str])

Representation of Resonite clound variable.

Expand source code
@dataclass
class ResoniteCloudVar:
    """Representation of Resonite clound variable."""
    ownerId: str
    """The ownerId of a ResoniteCloudVar should start with `U-`"""
    path: str
    """The path of a ResoniteCloudVar should start with a `U-` for a user owned path and a `G-` for a group owned path."""
    value: Optional[str]
    partitionKey: str
    rowKey: str
    timestamp: Optional[str]
    eTag: Optional[str]

Class variables

var eTag : Optional[str]
var ownerId : str

The ownerId of a ResoniteCloudVar should start with U-

var partitionKey : str
var path : str

The path of a ResoniteCloudVar should start with a U- for a user owned path and a G- for a group owned path.

var rowKey : str
var timestamp : Optional[str]
var value : Optional[str]
class ResoniteCloudVarDefs (definitionOwnerId: str, subpath: str, variableType: str, defaultValue: Optional[str], deleteScheduled: bool, readPermissions: List[str], writePermissions: List[str], listPermissions: List[str], partitionKey: str, rowKey: str, timestamp: str, eTag: str)

ResoniteCloudVarDefs(definitionOwnerId: str, subpath: str, variableType: str, defaultValue: Optional[str], deleteScheduled: bool, readPermissions: List[str], writePermissions: List[str], listPermissions: List[str], partitionKey: str, rowKey: str, timestamp: str, eTag: str)

Expand source code
@dataclass
class ResoniteCloudVarDefs:
    definitionOwnerId: str
    subpath: str
    variableType: str
    defaultValue: Optional[str]
    deleteScheduled: bool
    readPermissions: List[str]
    writePermissions: List[str]
    listPermissions: List[str]
    partitionKey: str
    rowKey: str
    timestamp: str
    eTag: str

Class variables

var defaultValue : Optional[str]
var definitionOwnerId : str
var deleteScheduled : bool
var eTag : str
var listPermissions : List[str]
var partitionKey : str
var readPermissions : List[str]
var rowKey : str
var subpath : str
var timestamp : str
var variableType : str
var writePermissions : List[str]
class ResoniteContact (id: str, contactUsername: str, contactStatus: ContactStatus, isAccepted: bool, profile: Optional[ProfileData], latestMessageTime: datetime.datetime, isMigrated: bool, isCounterpartMigrated: bool, ownerId: str)

ResoniteContact(id: str, contactUsername: str, contactStatus: resonitepy.classes.ContactStatus, isAccepted: bool, profile: Optional[resonitepy.classes.ProfileData], latestMessageTime: datetime.datetime, isMigrated: bool, isCounterpartMigrated: bool, ownerId: str)

Expand source code
@dataclass
class ResoniteContact:
    id: str
    contactUsername: str
    contactStatus: ContactStatus
    isAccepted: bool
    profile: Optional[ProfileData]
    latestMessageTime: datetime
    isMigrated: bool
    isCounterpartMigrated: bool
    ownerId: str

Class variables

var contactStatusContactStatus
var contactUsername : str
var id : str
var isAccepted : bool
var isCounterpartMigrated : bool
var isMigrated : bool
var latestMessageTime : datetime.datetime
var ownerId : str
var profile : Optional[ProfileData]
class ResoniteDirectory (id: str, assetUri: Optional[str], version: ResoniteRecordVersion, name: str, recordType: RecordType, ownerName: str, path: Optional[str], thumbnailUri: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, tags: List[str], creationTime: Optional[datetime.datetime], lastModificationTime: datetime.datetime, randomOrder: int, visits: int, rating: int, ownerId: str, lastModifyingMachineId: Optional[str])

Data class representing a Resonite directory.

Expand source code
@dataclass
class ResoniteDirectory(ResoniteRecord):
    """ Data class representing a Resonite directory.
    """

    lastModifyingMachineId: Optional[str]
    """The ID of the machine that last modified the directory."""
    ownerName: str
    """The name of the owner of the directory."""
    tags: List[str]
    """The tags associated with the directory."""
    creationTime: Optional[datetime]
    """The creation time of the directory."""

    @property
    def content_path(self) -> str:
        """The path of the content within the directory."""
        return str(PureWindowsPath(self.path, self.name))

Ancestors

Class variables

var lastModifyingMachineId : Optional[str]

The ID of the machine that last modified the directory.

Instance variables

var content_path : str

The path of the content within the directory.

Expand source code
@property
def content_path(self) -> str:
    """The path of the content within the directory."""
    return str(PureWindowsPath(self.path, self.name))

Inherited members

class ResoniteEntitlementDeleteRecovery

Data class representing the entitlement for deleting recovery data in Resonite.

Expand source code
@dataclass
class ResoniteEntitlementDeleteRecovery:
    """ Data class representing the entitlement for deleting recovery data in Resonite.
    """
    pass

Data class representing a Resonite link.

Expand source code
@dataclass
class ResoniteLink(ResoniteRecord):
    """ Data class representing a Resonite link.
    """

    assetUri: ParseResult
    """The parsed URI of the asset associated with the link."""

Ancestors

Inherited members

class ResoniteMessage (id: str, senderId: str, ownerId: str, sendTime: str, recipientId: str, messageType: ResoniteMessageType, senderUserSessionId: Optional[str], isMigrated: bool, readTime: datetime.datetime, otherId: str, lastUpdateTime: datetime.datetime, content: ResoniteMessageContentText | ResoniteMessageContentSessionInvite | ResoniteMessageContentObject | ResoniteMessageContentSound)

Representation of a Resonite message.

Expand source code
@dataclass
class ResoniteMessage:
    """Representation of a Resonite message."""
    id: str
    senderId: str
    ownerId: str
    """The ownerId of a ResoniteMessage should start with `U-`"""
    sendTime: str
    recipientId: str
    messageType: ResoniteMessageType
    senderUserSessionId: Optional[str]
    isMigrated: bool
    readTime: datetime
    otherId: str
    lastUpdateTime: datetime
    content: ResoniteMessageContentText | ResoniteMessageContentSessionInvite | ResoniteMessageContentObject | ResoniteMessageContentSound

Class variables

var contentResoniteMessageContentText | ResoniteMessageContentSessionInvite | ResoniteMessageContentObject | ResoniteMessageContentSound
var id : str
var isMigrated : bool
var lastUpdateTime : datetime.datetime
var messageTypeResoniteMessageType
var otherId : str
var ownerId : str

The ownerId of a ResoniteMessage should start with U-

var readTime : datetime.datetime
var recipientId : str
var sendTime : str
var senderId : str
var senderUserSessionId : Optional[str]
class ResoniteMessageContentObject (id: str, ownerId: str, assetUri: str, version: Optional[ResoniteRecordVersion], name: str, recordType: RecordType, ownerName: Optional[str], tags: List[str], path: Optional[str], thumbnailUri: str, isPublic: bool, isForPatrons: bool, isListed: bool, lastModificationTime: datetime.datetime, creationTime: datetime.datetime, firstPublishTime: Optional[datetime.datetime], isDeleted: Optional[bool], visits: int, rating: float, randomOrder: int, sumbissions: Optional[str])

Data class representing the content of a Resonite object message.

Expand source code
@dataclass
class ResoniteMessageContentObject:
    """ Data class representing the content of a Resonite object message.
    """

    id: str
    """The ID of the object."""
    ownerId: str
    """The ID of the object owner."""
    assetUri: str
    """The URI of the object asset."""
    version: Optional[ResoniteRecordVersion]
    """The version of the object record."""
    name: str
    """The name of the object."""
    recordType: RecordType
    """The type of the object record."""
    ownerName: Optional[str]
    """The name of the object owner."""
    tags: List[str]
    """The tags associated with the object."""
    path: Optional[str]
    """The path of the object."""
    thumbnailUri: str
    """The URI of the object thumbnail."""
    isPublic: bool
    """Whether the object is public."""
    isForPatrons: bool
    """Whether the object is for patrons."""
    isListed: bool
    """Whether the object is listed."""
    lastModificationTime: datetime
    """The timestamp of the last modification."""
    creationTime: datetime
    """The timestamp of the creation."""
    firstPublishTime: Optional[datetime]
    """The timestamp of the first publish."""
    isDeleted: Optional[bool]
    """Whether the object is deleted."""
    visits: int
    """The number of visits."""
    rating: float
    """The rating of the object."""
    randomOrder: int
    """The random order of the object."""
    sumbissions: Optional[str]
    """The submissions of the object."""

Class variables

var assetUri : str

The URI of the object asset.

var creationTime : datetime.datetime

The timestamp of the creation.

var firstPublishTime : Optional[datetime.datetime]

The timestamp of the first publish.

var id : str

The ID of the object.

var isDeleted : Optional[bool]

Whether the object is deleted.

var isForPatrons : bool

Whether the object is for patrons.

var isListed : bool

Whether the object is listed.

var isPublic : bool

Whether the object is public.

var lastModificationTime : datetime.datetime

The timestamp of the last modification.

var name : str

The name of the object.

var ownerId : str

The ID of the object owner.

var ownerName : Optional[str]

The name of the object owner.

var path : Optional[str]

The path of the object.

var randomOrder : int

The random order of the object.

var rating : float

The rating of the object.

var recordTypeRecordType

The type of the object record.

var sumbissions : Optional[str]

The submissions of the object.

var tags : List[str]

The tags associated with the object.

var thumbnailUri : str

The URI of the object thumbnail.

var version : Optional[ResoniteRecordVersion]

The version of the object record.

var visits : int

The number of visits.

class ResoniteMessageContentSessionInvite (name: str, description: Optional[str], correspondingWorldId: Optional[WorldId], tags: List[str], sessionId: str, normalizedSessionId: str, hostMachineId: str, hostUsername: str, compatibilityHash: Optional[str], universeId: Optional[str], appVersion: Optional[str], headlessHost: Optional[bool], sessionURLs: List[str], parentSessionIds: Optional[List[str]], nestedSessionIds: Optional[List[str]], sessionUsers: List[ResoniteSessionUser], thumbnail: Optional[str], joinedUsers: int, activeUsers: int, totalActiveUsers: int, totalJoinedUsers: int, maxUsers: int, mobileFriendly: bool, sessionBeginTime: datetime.datetime, lastUpdate: datetime.datetime, accessLevel: str, broadcastKey: Optional[str])

ResoniteMessageContentSessionInvite(name: str, description: Optional[str], correspondingWorldId: Optional[resonitepy.classes.WorldId], tags: List[str], sessionId: str, normalizedSessionId: str, hostMachineId: str, hostUsername: str, compatibilityHash: Optional[str], universeId: Optional[str], appVersion: Optional[str], headlessHost: Optional[bool], sessionURLs: List[str], parentSessionIds: Optional[List[str]], nestedSessionIds: Optional[List[str]], sessionUsers: List[resonitepy.classes.ResoniteSessionUser], thumbnail: Optional[str], joinedUsers: int, activeUsers: int, totalActiveUsers: int, totalJoinedUsers: int, maxUsers: int, mobileFriendly: bool, sessionBeginTime: datetime.datetime, lastUpdate: datetime.datetime, accessLevel: str, broadcastKey: Optional[str])

Expand source code
@dataclass
class ResoniteMessageContentSessionInvite:
    name: str
    description: Optional[str]
    correspondingWorldId: Optional[WorldId]
    tags: List[str]
    sessionId: str
    normalizedSessionId: str
    hostMachineId: str
    hostUsername: str
    compatibilityHash: Optional[str]
    universeId: Optional[str]
    appVersion: Optional[str]
    headlessHost: Optional[bool]
    sessionURLs: List[str]
    parentSessionIds: Optional[List[str]]
    nestedSessionIds: Optional[List[str]]
    sessionUsers: List[ResoniteSessionUser]
    thumbnail: Optional[str]
    joinedUsers: int
    activeUsers: int
    totalActiveUsers: int
    totalJoinedUsers: int
    maxUsers: int
    mobileFriendly: bool
    sessionBeginTime: datetime
    lastUpdate: datetime
    accessLevel: str
    broadcastKey: Optional[str]

Class variables

var accessLevel : str
var activeUsers : int
var appVersion : Optional[str]
var broadcastKey : Optional[str]
var compatibilityHash : Optional[str]
var correspondingWorldId : Optional[WorldId]
var description : Optional[str]
var headlessHost : Optional[bool]
var hostMachineId : str
var hostUsername : str
var joinedUsers : int
var lastUpdate : datetime.datetime
var maxUsers : int
var mobileFriendly : bool
var name : str
var nestedSessionIds : Optional[List[str]]
var normalizedSessionId : str
var parentSessionIds : Optional[List[str]]
var sessionBeginTime : datetime.datetime
var sessionId : str
var sessionURLs : List[str]
var sessionUsers : List[ResoniteSessionUser]
var tags : List[str]
var thumbnail : Optional[str]
var totalActiveUsers : int
var totalJoinedUsers : int
var universeId : Optional[str]
class ResoniteMessageContentSound (id: str, OwnerId: Optional[str], assetUri: str, globalVersion: Optional[int], localVersion: Optional[int], lastModifyingUserId: Optional[str], lastModifyingMachineId: Optional[str], name: str, recordType: RecordType, ownerName: Optional[str], tags: List[str], path: Optional[str], isPublic: bool, isForPatron: Optional[bool], isListed: bool, lastModificationTime: datetime.datetime, creationTime: datetime.datetime, firstPublishTime: Optional[datetime.datetime], visits: int, rating: float, randomOrder: int, submissions: Optional[str], neosDBmanifest: Optional[list])

ResoniteMessageContentSound(id: str, OwnerId: Optional[str], assetUri: str, globalVersion: Optional[int], localVersion: Optional[int], lastModifyingUserId: Optional[str], lastModifyingMachineId: Optional[str], name: str, recordType: resonitepy.classes.RecordType, ownerName: Optional[str], tags: List[str], path: Optional[str], isPublic: bool, isForPatron: Optional[bool], isListed: bool, lastModificationTime: datetime.datetime, creationTime: datetime.datetime, firstPublishTime: Optional[datetime.datetime], visits: int, rating: float, randomOrder: int, submissions: Optional[str], neosDBmanifest: Optional[list])

Expand source code
@dataclass
class ResoniteMessageContentSound:
    id: str
    OwnerId: Optional[str]
    assetUri: str
    globalVersion: Optional[int]
    localVersion: Optional[int]
    lastModifyingUserId: Optional[str]
    lastModifyingMachineId: Optional[str]
    name: str
    recordType: RecordType
    ownerName: Optional[str]
    tags: List[str]
    path: Optional[str]
    isPublic: bool
    isForPatron: Optional[bool]
    isListed: bool
    lastModificationTime: datetime
    creationTime: datetime
    firstPublishTime: Optional[datetime]
    visits: int
    rating: float
    randomOrder: int
    submissions: Optional[str]
    neosDBmanifest: Optional[list]

Class variables

var OwnerId : Optional[str]
var assetUri : str
var creationTime : datetime.datetime
var firstPublishTime : Optional[datetime.datetime]
var globalVersion : Optional[int]
var id : str
var isForPatron : Optional[bool]
var isListed : bool
var isPublic : bool
var lastModificationTime : datetime.datetime
var lastModifyingMachineId : Optional[str]
var lastModifyingUserId : Optional[str]
var localVersion : Optional[int]
var name : str
var neosDBmanifest : Optional[list]
var ownerName : Optional[str]
var path : Optional[str]
var randomOrder : int
var rating : float
var recordTypeRecordType
var submissions : Optional[str]
var tags : List[str]
var visits : int
class ResoniteMessageContentText (*args, **kw)

Class representing the content of a Resonite text message.

This will return directly a string.

Expand source code
class ResoniteMessageContentText(str):
    """ Class representing the content of a Resonite text message.

    This will return directly a string.
    """

    def __new__(cls, *args, **kw):
        return str.__new__(cls, *args, **kw)

Ancestors

  • builtins.str
class ResoniteMessageType (value, names=None, *, module=None, qualname=None, type=None, start=1)

Enum representing a Resonite message type.

Expand source code
class ResoniteMessageType(Enum):
    """ Enum representing a Resonite message type.
    """

    TEXT = "Text"
    """Text type message."""
    OBJECT = "Object"
    """Object type message."""
    SOUND = "Sound"
    """Audio type message."""
    SESSIONINVITE = "SessionInvite"
    """Session invite type message."""
    CREDITTRANSFER = "CreditTransfer"
    """Credit transfert type message."""
    SUGARCUBES = "SugarCubes"
    """Sugar cubes type message."""

Ancestors

  • enum.Enum

Class variables

var CREDITTRANSFER

Credit transfert type message.

var OBJECT

Object type message.

var SESSIONINVITE

Session invite type message.

var SOUND

Audio type message.

var SUGARCUBES

Sugar cubes type message.

var TEXT

Text type message.

class ResoniteObject (id: str, assetUri: str, version: ResoniteRecordVersion, name: str, recordType: RecordType, ownerName: str, path: Optional[str], thumbnailUri: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, tags: List[str], creationTime: datetime.datetime, lastModificationTime: datetime.datetime, randomOrder: int, visits: int, rating: int, ownerId: str, lastModifyingMachineId: Optional[str])

Data class representing a Resonite object.

Expand source code
@dataclass
class ResoniteObject(ResoniteRecord):
    """ Data class representing a Resonite object.
    """

    assetUri: str
    """The URI of the asset associated with the object."""
    lastModifyingMachineId: Optional[str]
    """ The ID of the machine that last modified the object."""
    ownerName: str
    """The name of the owner of the object."""
    tags: List[str]
    """The tags associated with the object."""
    creationTime: datetime
    """The creation time of the object."""

Ancestors

Class variables

var lastModifyingMachineId : Optional[str]

The ID of the machine that last modified the object.

Inherited members

class ResoniteRecord (id: str, assetUri: Optional[str], version: ResoniteRecordVersion, name: str, recordType: RecordType, ownerName: str, path: Optional[str], thumbnailUri: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, tags: Optional[list], creationTime: Optional[datetime.datetime], lastModificationTime: datetime.datetime, randomOrder: int, visits: int, rating: int, ownerId: str)

Data class representing a Resonite record.

Expand source code
@dataclass
class ResoniteRecord:
    """ Data class representing a Resonite record.
    """

    id: str
    """The ID of the record."""
    assetUri: Optional[str]
    """The URI of the asset associated with the record."""
    version: ResoniteRecordVersion
    """The version of the record."""
    name: str
    """The name of the record."""
    recordType: RecordType
    """The type of the record."""
    ownerName: str
    """The name of the owner of the record."""
    path: Optional[str]
    """The path of the record."""
    thumbnailUri: Optional[str]
    """The URI of the thumbnail associated with the record."""
    isPublic: bool
    """Whether the record is public."""
    isForPatrons: bool
    """Whether the record is for patrons."""
    isListed: bool
    """Whether the record is listed."""
    isDeleted: bool
    """Whether the record is deleted."""
    tags: Optional[list]
    """The tags associated with the record."""
    creationTime: Optional[datetime]
    """The creation time of the record."""
    lastModificationTime: datetime
    """The last modification time of the record."""
    randomOrder: int
    """The random order of the record."""
    visits: int
    """The number of visits to the record."""
    rating: int
    """The rating of the record."""
    ownerId: str
    """The ID of the owner of the record."""

Subclasses

Class variables

var assetUri : Optional[str]

The URI of the asset associated with the record.

var creationTime : Optional[datetime.datetime]

The creation time of the record.

var id : str

The ID of the record.

var isDeleted : bool

Whether the record is deleted.

var isForPatrons : bool

Whether the record is for patrons.

var isListed : bool

Whether the record is listed.

var isPublic : bool

Whether the record is public.

var lastModificationTime : datetime.datetime

The last modification time of the record.

var name : str

The name of the record.

var ownerId : str

The ID of the owner of the record.

var ownerName : str

The name of the owner of the record.

var path : Optional[str]

The path of the record.

var randomOrder : int

The random order of the record.

var rating : int

The rating of the record.

var recordTypeRecordType

The type of the record.

var tags : Optional[list]

The tags associated with the record.

var thumbnailUri : Optional[str]

The URI of the thumbnail associated with the record.

var versionResoniteRecordVersion

The version of the record.

var visits : int

The number of visits to the record.

class ResoniteRecordVersion (globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], lastModifyingMachineId: Optional[str])

Data class representing the version of a Resonite record.

Expand source code
@dataclass
class ResoniteRecordVersion:
    """ Data class representing the version of a Resonite record.
    """

    globalVersion: int
    """The global version of the record."""
    localVersion: int
    """The local version of the record."""
    lastModifyingUserId: Optional[str]
    """The ID of the user who last modified the record. (optional)"""
    lastModifyingMachineId: Optional[str]
    """The ID of the machine that last modified the record. (optional"""

Class variables

var globalVersion : int

The global version of the record.

var lastModifyingMachineId : Optional[str]

The ID of the machine that last modified the record. (optional

var lastModifyingUserId : Optional[str]

The ID of the user who last modified the record. (optional)

var localVersion : int

The local version of the record.

class ResoniteSession (activeSessions: Optional[str], activeUsers: int, compatibilityHash: Optional[str], correspondingWorldId: Optional[WorldId], description: Optional[str], hasEnded: bool, headlessHost: bool, hostMachineId: str, hostUserSessionId: str, hostUserId: Optional[str], hostUsername: str, isValid: bool, joinedUsers: int, lastUpdate: datetime.datetime, maxUsers: int, mobileFriendly: bool, name: str, appVersion: str, normalizedSessionId: str, sessionBeginTime: datetime.datetime, sessionId: str, sessionURLs: List[str], sessionUsers: List[ResoniteSessionUser], tags: List[str], thumbnailUrl: Optional[str], totalActiveUsers: int, totalJoinedUsers: int, hideFromListing: bool)

Data class representing a Resonite session.

Expand source code
@dataclass
class ResoniteSession:
    """ Data class representing a Resonite session.
    """

    activeSessions: Optional[str]
    """The active sessions."""
    activeUsers: int
    """ The number of active users."""
    compatibilityHash: Optional[str]
    """The compatibility hash."""
    correspondingWorldId: Optional[WorldId]
    """The corresponding world ID."""
    description: Optional[str]
    """The description of the session."""
    hasEnded: bool
    """Whether the session has ended."""
    headlessHost: bool
    """Whether the host is headless."""
    hostMachineId: str
    """The machine ID of the host."""
    hostUserSessionId: str
    """The user session ID of the host."""
    hostUserId: Optional[str]
    """The user ID of the host."""
    hostUsername: str
    """The username of the host."""
    isValid: bool
    """Whether the session is valid."""
    joinedUsers: int
    """The number of joined users."""
    lastUpdate: datetime
    """The timestamp of the last update."""
    maxUsers: int
    """The maximum number of users."""
    mobileFriendly: bool
    """Whether the session is mobile-friendly."""
    name: str
    """The name of the session."""
    appVersion: str
    """The version of the app."""
    normalizedSessionId: str
    """The normalized session ID."""
    sessionBeginTime: datetime
    """The timestamp of the session begin time."""
    sessionId: str
    """The session ID."""
    sessionURLs: List[str]
    """The URLs of the session."""
    sessionUsers: List[ResoniteSessionUser]
    """The users in the session."""
    tags: List[str]
    """The tags associated with the session."""
    thumbnailUrl: Optional[str]
    """The URL of the thumbnail."""
    totalActiveUsers: int
    """The total number of active users."""
    totalJoinedUsers: int
    """The total number of joined users."""
    hideFromListing: bool
    """Whether the session is hidden from listing."""

Class variables

var activeSessions : Optional[str]

The active sessions.

var activeUsers : int

The number of active users.

var appVersion : str

The version of the app.

var compatibilityHash : Optional[str]

The compatibility hash.

var correspondingWorldId : Optional[WorldId]

The corresponding world ID.

var description : Optional[str]

The description of the session.

var hasEnded : bool

Whether the session has ended.

var headlessHost : bool

Whether the host is headless.

var hideFromListing : bool

Whether the session is hidden from listing.

var hostMachineId : str

The machine ID of the host.

var hostUserId : Optional[str]

The user ID of the host.

var hostUserSessionId : str

The user session ID of the host.

var hostUsername : str

The username of the host.

var isValid : bool

Whether the session is valid.

var joinedUsers : int

The number of joined users.

var lastUpdate : datetime.datetime

The timestamp of the last update.

var maxUsers : int

The maximum number of users.

var mobileFriendly : bool

Whether the session is mobile-friendly.

var name : str

The name of the session.

var normalizedSessionId : str

The normalized session ID.

var sessionBeginTime : datetime.datetime

The timestamp of the session begin time.

var sessionId : str

The session ID.

var sessionURLs : List[str]

The URLs of the session.

var sessionUsers : List[ResoniteSessionUser]

The users in the session.

var tags : List[str]

The tags associated with the session.

var thumbnailUrl : Optional[str]

The URL of the thumbnail.

var totalActiveUsers : int

The total number of active users.

var totalJoinedUsers : int

The total number of joined users.

class ResoniteSessionUser (isPresent: bool, userID: Optional[str], username: str, userSessionId: Optional[str], outputDevice: Optional[int])

Data class representing a Resonite session user.

Expand source code
@dataclass
class ResoniteSessionUser:
    """ Data class representing a Resonite session user.
    """

    isPresent: bool
    """Whether the user is present."""
    userID: Optional[str]
    """The ID of the user."""
    username: str
    """The username of the user."""
    userSessionId: Optional[str]
    """The session ID of the user."""
    outputDevice: Optional[int]
    """The output device of the user."""

Class variables

var isPresent : bool

Whether the user is present.

var outputDevice : Optional[int]

The output device of the user.

var userID : Optional[str]

The ID of the user.

var userSessionId : Optional[str]

The session ID of the user.

var username : str

The username of the user.

class ResoniteTexture (id: str, assetUri: Optional[str], version: ResoniteRecordVersion, name: str, recordType: RecordType, ownerName: str, path: Optional[str], thumbnailUri: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, tags: Optional[list], creationTime: Optional[datetime.datetime], lastModificationTime: datetime.datetime, randomOrder: int, visits: int, rating: int, ownerId: str)

Data class representing a Resonite texture.

Expand source code
@dataclass
class ResoniteTexture(ResoniteRecord):
    """ Data class representing a Resonite texture.
    """
    pass

Ancestors

Inherited members

class ResoniteUser (id: str, username: str, normalizedUsername: str, email: str, registrationDate: datetime.datetime, isVerified: bool, isLocked: bool, supressBanEvasion: bool, two_fa_login: bool, profile: Optional[ProfileData], supporterMetadata: Optional[List[supporterMetadataPatreon]], entitlements: Optional[List[ResoniteUserEntitlementShoutOut | ResoniteUserEntitlementCredits | ResoniteUserEntitlementGroupCreation | ResoniteEntitlementDeleteRecovery | ResoniteUserEntitlementBadge | ResoniteUserEntitlementHeadless | ResoniteUserEntitlementExitMessage | ResoniteUserEntitlementStorageSpace]], migratedData: Optional[ResoniteUserMigrationData], tags: Optional[List[str]] = <factory>)

Data class representing a Resonite user.

Expand source code
@dataclass
class ResoniteUser:
    """ Data class representing a Resonite user.
    """

    id: str
    """The ID of the user."""
    username: str
    """The username of the user."""
    normalizedUsername: str
    """The normalized username of the user."""
    email: str
    """The email of the user."""
    registrationDate: datetime
    """The registration date of the user."""
    isVerified: bool
    """Indicates whether the user is verified."""
    isLocked: bool
    """Whether the user is locked."""
    supressBanEvasion: bool
    """Whether ban evasion is suppressed for the user."""
    two_fa_login: bool
    """Whether two-factor authentication is enabled for login."""
    profile: Optional[ProfileData]
    """The profile data of the user."""
    supporterMetadata: Optional[List[
        supporterMetadataPatreon
    ]]
    """The Patreon supporter metadata of the user."""
    entitlements: Optional[List[
        ResoniteUserEntitlementShoutOut |
        ResoniteUserEntitlementCredits |
        ResoniteUserEntitlementGroupCreation |
        ResoniteEntitlementDeleteRecovery |
        ResoniteUserEntitlementBadge |
        ResoniteUserEntitlementHeadless |
        ResoniteUserEntitlementExitMessage |
        ResoniteUserEntitlementStorageSpace
    ]]
    """The entitlements of the user."""
    migratedData: Optional[ResoniteUserMigrationData]
    """The migrated data of the user."""
    tags: Optional[List[str]] = field(default_factory=list)
    """The tags associated with the user."""

Class variables

var email : str

The email of the user.

var entitlements : Optional[List[ResoniteUserEntitlementShoutOut | ResoniteUserEntitlementCredits | ResoniteUserEntitlementGroupCreation | ResoniteEntitlementDeleteRecovery | ResoniteUserEntitlementBadge | ResoniteUserEntitlementHeadless | ResoniteUserEntitlementExitMessage | ResoniteUserEntitlementStorageSpace]]

The entitlements of the user.

var id : str

The ID of the user.

var isLocked : bool

Whether the user is locked.

var isVerified : bool

Indicates whether the user is verified.

var migratedData : Optional[ResoniteUserMigrationData]

The migrated data of the user.

var normalizedUsername : str

The normalized username of the user.

var profile : Optional[ProfileData]

The profile data of the user.

var registrationDate : datetime.datetime

The registration date of the user.

var supporterMetadata : Optional[List[supporterMetadataPatreon]]

The Patreon supporter metadata of the user.

var supressBanEvasion : bool

Whether ban evasion is suppressed for the user.

var tags : Optional[List[str]]

The tags associated with the user.

var two_fa_login : bool

Whether two-factor authentication is enabled for login.

var username : str

The username of the user.

class ResoniteUserEntitlementBadge (badgeType: str, badgeCount: int)

Data class representing an entitlement badge for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementBadge:
    """ Data class representing an entitlement badge for a Resonite user.
    """

    badgeType: str
    """The type of the badge."""
    badgeCount: int
    """The count of the badge."""

Class variables

var badgeCount : int

The count of the badge.

var badgeType : str

The type of the badge.

class ResoniteUserEntitlementCredits (creditType: str, friendlyDescription: str)

Data class representingan entitlement credit for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementCredits:
    """ Data class representingan entitlement credit for a Resonite user.
    """

    creditType: str
    """The type of the credit."""
    friendlyDescription: str
    """The friendly description of the credit."""

Class variables

var creditType : str

The type of the credit.

var friendlyDescription : str

The friendly description of the credit.

class ResoniteUserEntitlementExitMessage (isLifetime: bool, messageCount: int, friendlyDescription: str)

Data class representing an exit message entitlement for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementExitMessage:
    """ Data class representing an exit message entitlement for a Resonite user.
    """

    isLifetime: bool
    """Indicates whether the entitlement is lifetime."""
    messageCount: int
    """The count of exit messages."""
    friendlyDescription: str
    """The friendly description of the exit message entitlement."""

Class variables

var friendlyDescription : str

The friendly description of the exit message entitlement.

var isLifetime : bool

Indicates whether the entitlement is lifetime.

var messageCount : int

The count of exit messages.

class ResoniteUserEntitlementGroupCreation (groupCount: int)

Data class representing the entitlement for the group creation for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementGroupCreation:
    """ Data class representing the entitlement for the group creation for a Resonite user.
    """

    groupCount: int
    """The number of groups the user is entitled to create."""

Class variables

var groupCount : int

The number of groups the user is entitled to create.

class ResoniteUserEntitlementHeadless (friendlyDescription: str)

Data class representing a headless entitlement for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementHeadless:
    """ Data class representing a headless entitlement for a Resonite user.
    """

    friendlyDescription: str
    """The friendly description of the headless entitlement."""

Class variables

var friendlyDescription : str

The friendly description of the headless entitlement.

class ResoniteUserEntitlementShoutOut (shoutoutType: str, friendlyDescription: str)

Data class representing an entitlement shout-out for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementShoutOut:
    """ Data class representing an entitlement shout-out for a Resonite user.
    """

    shoutoutType: str
    """The type of the shout-out."""
    friendlyDescription: str
    """The friendly description of the shout-out."""

Class variables

var friendlyDescription : str

The friendly description of the shout-out.

var shoutoutType : str

The type of the shout-out.

class ResoniteUserEntitlementStorageSpace (bytes: int, maximumShareLevel: int, storageId: str, group: str, startsOn: datetime.datetime, expiresOn: datetime.datetime, name: str, description: str)

Data class representing a storage space entitlement for a Resonite user.

Expand source code
@dataclass
class ResoniteUserEntitlementStorageSpace:
    """ Data class representing a storage space entitlement for a Resonite user.
    """

    bytes: int
    """The amount of storage space in bytes."""
    maximumShareLevel: int
    """The maximum share level."""
    storageId: str
    """The ID of the storage space."""
    group: str
    """The group associated with the storage space."""
    startsOn: datetime
    """The start date of the entitlement."""
    expiresOn: datetime
    """The expiration date of the entitlement."""
    name: str
    """The name of the storage space."""
    description: str
    """The description of the storage space."""

Class variables

var bytes : int

The amount of storage space in bytes.

var description : str

The description of the storage space.

var expiresOn : datetime.datetime

The expiration date of the entitlement.

var group : str

The group associated with the storage space.

var maximumShareLevel : int

The maximum share level.

var name : str

The name of the storage space.

var startsOn : datetime.datetime

The start date of the entitlement.

var storageId : str

The ID of the storage space.

class ResoniteUserMigrationData (username: str, email: str, userId: str, quotaBytes: int, usedBytes: int, patreonData: PatreonData, quotaBytesSources: Optional[ResoniteUserQuotaBytesSources], registrationDate: datetime.datetime)

Data class representing the migration data for a Resonite user.

Expand source code
@dataclass
class ResoniteUserMigrationData:
    """ Data class representing the migration data for a Resonite user.
    """

    username: str
    """The username of the user."""
    email: str
    """The email of the user."""
    userId: str
    """The ID of the user."""
    quotaBytes: int
    """The quota bytes of the user."""
    usedBytes: int
    """The used bytes of the user."""
    patreonData: PatreonData
    """ The Patreon data of the user."""
    quotaBytesSources: Optional[ResoniteUserQuotaBytesSources]
    """The quota bytes sources of the user."""
    registrationDate: datetime
    """The registration date of the user."""

Class variables

var email : str

The email of the user.

var patreonDataPatreonData

The Patreon data of the user.

var quotaBytes : int

The quota bytes of the user.

var quotaBytesSources : Optional[ResoniteUserQuotaBytesSources]

The quota bytes sources of the user.

var registrationDate : datetime.datetime

The registration date of the user.

var usedBytes : int

The used bytes of the user.

var userId : str

The ID of the user.

var username : str

The username of the user.

class ResoniteUserQuotaBytesSources (base: int, patreon: Optional[int])

Data class representing the quota bytes sources for a Resonite user.

Expand source code
@dataclass
class ResoniteUserQuotaBytesSources:
    """ Data class representing the quota bytes sources for a Resonite user.
    """

    base: int
    """The base quota bytes."""
    patreon: Optional[int]
    """The Patreon quota bytes."""

Class variables

var base : int

The base quota bytes.

var patreon : Optional[int]

The Patreon quota bytes.

class ResoniteUserStatus (onlineStatus: OnlineStatus, lastStatusChange: datetime.datetime, currentSessionAccessLevel: int, currentSessionHidden: bool, currentHosting: bool, compatibilityHash: Optional[str], neosVersion: Optional[str], publicRSAKey: Optional[PublicRSAKey], OutputDevice: Optional[str], isMobile: bool)

Data class representing the status of a Resonite user.

Expand source code
@dataclass
class ResoniteUserStatus:
    """ Data class representing the status of a Resonite user.
    """

    onlineStatus: OnlineStatus
    """The online status of the user."""
    lastStatusChange: datetime
    """The timestamp of the last status change."""
    currentSessionAccessLevel: int
    """The access level of the current session."""
    currentSessionHidden: bool
    """Whether the current session is hidden."""
    currentHosting: bool
    """Whether the user is currently hosting a session."""
    compatibilityHash: Optional[str]
    """The compatibility hash."""
    neosVersion: Optional[str]
    """The version of Neos. """
    publicRSAKey: Optional[PublicRSAKey]
    """The public RSA key."""
    OutputDevice: Optional[str]
    """The output device."""
    isMobile: bool
    """Whether the user is on a mobile device."""

Class variables

var OutputDevice : Optional[str]

The output device.

var compatibilityHash : Optional[str]

The compatibility hash.

var currentHosting : bool

Whether the user is currently hosting a session.

var currentSessionAccessLevel : int

The access level of the current session.

var currentSessionHidden : bool

Whether the current session is hidden.

var isMobile : bool

Whether the user is on a mobile device.

var lastStatusChange : datetime.datetime

The timestamp of the last status change.

var neosVersion : Optional[str]

The version of Neos.

var onlineStatusOnlineStatus

The online status of the user.

var publicRSAKey : Optional[PublicRSAKey]

The public RSA key.

class ResoniteWorld (id: str, assetUri: Optional[str], version: ResoniteRecordVersion, name: str, recordType: RecordType, ownerName: str, path: Optional[str], thumbnailUri: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, tags: Optional[list], creationTime: Optional[datetime.datetime], lastModificationTime: datetime.datetime, randomOrder: int, visits: int, rating: int, ownerId: str)

Data class representing a Resonite world.

Expand source code
@dataclass
class ResoniteWorld(ResoniteRecord):
    """ Data class representing a Resonite world.
    """
    pass

Ancestors

Inherited members

class Snapshot (totalCents: int, patreonRawCents: int, deltaCents: int, pledgeCents: int, email: str, timestamp: str)

Data class representing a snapshot of data.

Expand source code
@dataclass
class Snapshot:
    """ Data class representing a snapshot of data.
    """

    totalCents: int
    """The total cents."""
    patreonRawCents: int
    """The raw cents from Patreon."""
    deltaCents: int
    """The delta cents."""
    pledgeCents: int
    """The pledge cents."""
    email: str
    """The email associated with the snapshot."""
    timestamp: str
    """The timestamp of the snapshot."""

Class variables

var deltaCents : int

The delta cents.

var email : str

The email associated with the snapshot.

var patreonRawCents : int

The raw cents from Patreon.

var pledgeCents : int

The pledge cents.

var timestamp : str

The timestamp of the snapshot.

var totalCents : int

The total cents.

class UserStatusData (activeSessions: Optional[List[ResoniteSession]], currentSession: Optional[ResoniteSession], compatibilityHash: Optional[str], currentHosting: bool, currentSessionAccessLevel: CurrentResoniteSessionAccessLevel, currentSessionHidden: bool, currentSessionId: Optional[str], isMobile: bool, lastStatusChange: datetime.datetime, neosVersion: Optional[str], onlineStatus: OnlineStatus, OutputDevice: Optional[str], publicRSAKey: Optional[PublicRSAKey])

Data class representing an user status data.

Expand source code
@dataclass
class UserStatusData:
    """ Data class representing an user status data.
    """

    activeSessions: Optional[List[ResoniteSession]]
    """The list of active sessions."""
    currentSession: Optional[ResoniteSession]
    """The current session."""
    compatibilityHash: Optional[str]
    """The compatibility hash."""
    currentHosting: bool
    """Whether the user is currently hosting a session."""
    currentSessionAccessLevel: CurrentResoniteSessionAccessLevel
    """The access level of the current session."""
    currentSessionHidden: bool
    """Whether the current session is hidden."""
    currentSessionId: Optional[str]
    """The ID of the current session."""
    isMobile: bool
    """Whether the user is on a mobile device."""
    lastStatusChange: datetime
    """The timestamp of the last status change."""
    neosVersion: Optional[str]
    """The version of Neos."""
    onlineStatus: OnlineStatus
    """The online status of the user."""
    OutputDevice: Optional[str]
    """The output device of the user."""
    publicRSAKey: Optional[PublicRSAKey]
    """The public RSA key of the user."""

Class variables

var OutputDevice : Optional[str]

The output device of the user.

var activeSessions : Optional[List[ResoniteSession]]

The list of active sessions.

var compatibilityHash : Optional[str]

The compatibility hash.

var currentHosting : bool

Whether the user is currently hosting a session.

var currentSession : Optional[ResoniteSession]

The current session.

var currentSessionAccessLevelCurrentResoniteSessionAccessLevel

The access level of the current session.

var currentSessionHidden : bool

Whether the current session is hidden.

var currentSessionId : Optional[str]

The ID of the current session.

var isMobile : bool

Whether the user is on a mobile device.

var lastStatusChange : datetime.datetime

The timestamp of the last status change.

var neosVersion : Optional[str]

The version of Neos.

var onlineStatusOnlineStatus

The online status of the user.

var publicRSAKey : Optional[PublicRSAKey]

The public RSA key of the user.

class WorldId (ownerId: str, recordId: str)

Data class representing a World ID.

Expand source code
@dataclass
class WorldId:
    """ Data class representing a World ID.
    """

    ownerId: str
    """The owner ID of the world. Start with `U-`"""
    recordId: str
    """The record ID of the world."""

Class variables

var ownerId : str

The owner ID of the world. Start with U-

var recordId : str

The record ID of the world.

class supporterMetadataPatreon (isActiveSupporter: bool, totalSupportMonths: int, totalSupportCents: int, lastTierCents: int, highestTierCents: int, lowestTierCents: int, firstSupportTimestamp: datetime.datetime, lastSupportTimestamp: datetime.datetime)

Data class representing the Patreon supporter metadata.

Expand source code
@dataclass
class supporterMetadataPatreon:
    """ Data class representing the Patreon supporter metadata.
    """

    isActiveSupporter: bool
    """Whether the user is an active supporter."""
    totalSupportMonths: int
    """The total number of months of support."""
    totalSupportCents: int
    """The total amount of support in cents."""
    lastTierCents: int
    """The amount of the last tier in cents."""
    highestTierCents: int
    """The amount of the highest tier in cents."""
    lowestTierCents: int
    """The amount of the lowest tier in cents."""
    firstSupportTimestamp: datetime
    """The timestamp of the first support."""
    lastSupportTimestamp: datetime
    """The timestamp of the last support."""

Class variables

var firstSupportTimestamp : datetime.datetime

The timestamp of the first support.

var highestTierCents : int

The amount of the highest tier in cents.

var isActiveSupporter : bool

Whether the user is an active supporter.

var lastSupportTimestamp : datetime.datetime

The timestamp of the last support.

var lastTierCents : int

The amount of the last tier in cents.

var lowestTierCents : int

The amount of the lowest tier in cents.

var totalSupportCents : int

The total amount of support in cents.

var totalSupportMonths : int

The total number of months of support.