Module neosvrpy.classes

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

Expand source code
"""
This module define some of the NeosVR 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 neosvrpy.secrets import generate
from neosvrpy.exceptions import NeosException

from urllib.parse import ParseResult


class RecordType(Enum):
    """Representation of the type of a NeosVR record."""
    OBJECT = "object"
    LINK = "link"
    DIRECTORY = "directory"
    WORLD = "world"
    TEXTURE = "texture"
    AUDIO = "audio"


@dataclass
class NeosRecord:
    """Representation of a NeosVR record."""
    id: str
    globalVersion: int
    localVersion: int
    lastModifyingUserId: Optional[str]
    name: str
    recordType: RecordType
    path: Optional[str]
    isPublic: bool
    isForPatrons: bool
    isListed: bool
    isDeleted: bool
    lastModificationTime: datetime
    visits: int
    rating: int
    ownerId: str


@dataclass
class NeosLink(NeosRecord):
    """Representation of a NeosVR link."""
    assetUri: ParseResult


@dataclass
class NeosDirectory(NeosRecord):
    """Representation of a NeosVR directory."""
    lastModifyingMachineId: Optional[str]
    ownerName: str
    tags: List[str]
    creationTime: Optional[datetime]

    @property
    def content_path(self) -> str:
        return str(PureWindowsPath(self.path, self.name))


@dataclass
class NeosObject(NeosRecord):
    """Represenation of a NeosVR object."""
    assetUri: str
    lastModifyingMachineId: str
    ownerName: str
    tags: List[str]
    creationTime: datetime

@dataclass
class NeosWorld(NeosRecord):
    """Representation of a NeosVR world."""
    pass

@dataclass
class NeosTexture(NeosRecord):
    """Representation of a NeosVR texture."""
    pass

@dataclass
class NeosAudio(NeosRecord):
    """Representation of a NeosVR audio."""
    pass


recordTypeMapping = {
    RecordType.DIRECTORY: NeosDirectory,
    RecordType.LINK: NeosLink,
    RecordType.OBJECT: NeosObject,
    RecordType.WORLD: NeosWorld,
    RecordType.TEXTURE: NeosTexture,
    RecordType.AUDIO: NeosAudio,
}


@dataclass
class LoginDetails:
    """Representation of a NeosVR login detail."""
    ownerId: Optional[str] = None
    """The ownerId of a LoginDetails should start with `U-`"""
    username: Optional[str] = None
    email: Optional[str] = None
    password: Optional[str] = None
    secretMachineId: str = field(default_factory=generate)
    """See the generate class in the neos.secrets module."""
    rememberMe: Optional[str] = False

    def __post_init__(self):
        if not self.ownerId and not self.username and not self.email:
            raise NeosException(
                'Either an ownerId, an username or an email is needed')
        if not self.password:
            raise NeosException('A password is needed')


@dataclass
class ProfileData:
    """Representation of a NeosVR profile data."""
    iconUrl: Optional[str]
    tokenOutOut: Optional[List[str]]


@dataclass
class CreditData:
    """Representation of a NeosVR credit."""
    KFC: float
    NCR: float
    CDFT: float


@dataclass
class PatreonData:
    """Representation of a NeosVR Patreon data."""
    isPatreonSupporter: bool
    patreonId: Optional[str]
    lastPatreonPledgeCents: int
    lastTotalCents: int
    minimumTotalUnits: int
    externalCents: int
    lastExternalCents: int
    hasSupported: bool
    lastIsAnorak: bool
    priorityIssue: int
    lastPlusActivationTime: datetime
    lastActivationTime: datetime
    lastPlusPledgeAmount: int
    lastPaidPledgeAmount: int
    accountName: str
    currentAccountType: int
    currentAccountCents: int
    pledgedAccountType: int


@dataclass
class NeosUser:
    """Representation of a NeosVR user."""
    id: str
    username: str
    normalizedUsername: str
    email: Optional[str]
    registrationDate: datetime
    isVerified: bool
    quotaBytes: Optional[int]
    isLocked: bool
    accountBanExpiration: Optional[datetime]
    publicBanExpiration: Optional[datetime]
    spectatorBanExpiration: Optional[datetime]
    muteBanExpiration: Optional[datetime]
    usedBytes: Optional[int]
    profile: Optional[ProfileData]
    credits: Optional[CreditData]
    NCRdepositAddress: Optional[str]
    patreonData: Optional[PatreonData]
    tags: Optional[List[str]] = field(default_factory=list)

@dataclass
class WorldId:
    """Representation of a world id."""
    ownerId: str
    """The ownerId of a WorldId should start with `U-`"""
    recordId: str

@dataclass
class SessionUser:
    """Representation of a session user."""
    isPresent: bool
    userID: Optional[str]
    username: str

@dataclass
class Session:
    """Representation of a session."""
    activeSessions: Optional[str]
    activeUsers: int
    compatibilityHash: Optional[str]
    correspondingWorldId: Optional[WorldId]
    description: Optional[str]
    hasEnded: bool
    headlessHost: bool
    hostMachineId: str
    hostUserId: Optional[str]
    hostUsername: str
    isValid: bool
    joinedUsers: int
    lastUpdate: datetime
    maxUsers: int
    mobileFriendly: bool
    name: str
    neosVersion: str
    normalizedSessionId: str
    sessionBeginTime: datetime
    sessionId: str
    sessionURLs: List[str]
    sessionUsers: List[SessionUser]
    tags: List[str]
    thumbnail: Optional[str]
    totalActiveUsers: int
    totalJoinedUsers: int


@dataclass
class PublicRSAKey:
    """Representation of a public key."""
    Exponent: str
    Modulus: str


class OnlineStatus(Enum):
    """Representation of an online status."""
    ONLINE = "Online"
    AWAY = "Away"
    BUSY = "Busy"
    OFFLINE = "Offline"


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


class CurrentSessionAccessLevel(Enum):
    """Representation of a current session access level."""
    PRIVATE = 0
    LAN = 1
    FRIENDS = 2
    FRIENDSOFFRIENDS = 3
    REGISTEREDUSERS = 4
    ANYONE = 5

    def __str__(self):
        text = {
            'PRIVATE': 'Private',
            'LAN': 'LAN',
            'FRIENDS': 'Contacts',
            'FRIENDSOFFRIENDS': 'Contacts+',
            'REGISTEREDUSERS': 'Registered Users',
            'ANYONE': 'Anyone'
        }
        return text[self.name]


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


@dataclass
class UserStatusData:
    """Representation of a NeosVR user status data."""
    activeSessions: Optional[List[Session]]
    currentSession: Optional[Session]
    compatibilityHash: Optional[str]
    currentHosting: bool
    currentSessionAccessLevel: CurrentSessionAccessLevel
    currentSessionHidden: bool
    currentSessionId: Optional[str]
    isMobile: bool
    lastStatusChange: datetime
    neosVersion: Optional[str]
    onlineStatus: OnlineStatus
    OutputDevice: Optional[str]
    publicRSAKey: Optional[PublicRSAKey]

@dataclass
class NeosUserStatus:
    """Represenation of a NeosVR user status."""
    onlineStatus: OnlineStatus
    lastStatusChange: datetime
    currentSessionAccessLevel: int
    currentSessionHidden: bool
    currentHosting: bool
    compatibilityHash: Optional[str]
    neosVersion: Optional[str]
    publicRSAKey: Optional[PublicRSAKey]
    OutputDevice: Optional[str]
    isMobile: bool

class FriendStatus(Enum):
    """Representation of a FriendStatus."""
    ACCEPTED = "Accepted"
    IGNORED = "Ignored"
    REQUESTED = "Requested"
    NONE = "None"


friendStatusMapping = {
    FriendStatus.ACCEPTED: "Accepted",
    FriendStatus.IGNORED: "Ignored",
    FriendStatus.REQUESTED: "Requested",
    FriendStatus.NONE: "None",
}


@dataclass
class NeosFriend:
    """Representation of a NeosVR friend."""
    id: str
    friendUsername: str
    friendStatus: FriendStatus
    isAccepted: bool
    userStatus: UserStatusData
    profile: Optional[ProfileData]
    latestMessageTime: datetime

class NeosMessageType(Enum):
    TEXT = "Text"
    OBJECT = "Object"
    SOUND = "Sound"
    SESSIONINVITE = "SessionInvite"
    CREDITTRANSFER = "CreditTransfer"
    SUGARCUBES = "SugarCubes"

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

@dataclass
class NeosMessage:
    """Representation of a NeosVR message."""
    id: str
    senderId: str
    ownerId: str
    """The ownerId of a NeosMessage should start with `U-`"""
    sendTime: str
    recipientId: str
    messageType: NeosMessageType
    content: str

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


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


@dataclass
class NeosCloudVarDefs:
    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 CreditData (KFC: float, NCR: float, CDFT: float)

Representation of a NeosVR credit.

Expand source code
@dataclass
class CreditData:
    """Representation of a NeosVR credit."""
    KFC: float
    NCR: float
    CDFT: float

Class variables

var CDFT : float
var KFC : float
var NCR : float
class CurrentSessionAccessLevel (value, names=None, *, module=None, qualname=None, type=None, start=1)

Representation of a current session access level.

Expand source code
class CurrentSessionAccessLevel(Enum):
    """Representation of a current session access level."""
    PRIVATE = 0
    LAN = 1
    FRIENDS = 2
    FRIENDSOFFRIENDS = 3
    REGISTEREDUSERS = 4
    ANYONE = 5

    def __str__(self):
        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
var FRIENDS
var FRIENDSOFFRIENDS
var LAN
var PRIVATE
var REGISTEREDUSERS
class FriendStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)

Representation of a FriendStatus.

Expand source code
class FriendStatus(Enum):
    """Representation of a FriendStatus."""
    ACCEPTED = "Accepted"
    IGNORED = "Ignored"
    REQUESTED = "Requested"
    NONE = "None"

Ancestors

  • enum.Enum

Class variables

var ACCEPTED
var IGNORED
var NONE
var REQUESTED
class LoginDetails (ownerId: Optional[str] = None, username: Optional[str] = None, email: Optional[str] = None, password: Optional[str] = None, secretMachineId: str = <factory>, rememberMe: Optional[str] = False)

Representation of a NeosVR login detail.

Expand source code
@dataclass
class LoginDetails:
    """Representation of a NeosVR login detail."""
    ownerId: Optional[str] = None
    """The ownerId of a LoginDetails should start with `U-`"""
    username: Optional[str] = None
    email: Optional[str] = None
    password: Optional[str] = None
    secretMachineId: str = field(default_factory=generate)
    """See the generate class in the neos.secrets module."""
    rememberMe: Optional[str] = False

    def __post_init__(self):
        if not self.ownerId and not self.username and not self.email:
            raise NeosException(
                'Either an ownerId, an username or an email is needed')
        if not self.password:
            raise NeosException('A password is needed')

Class variables

var email : Optional[str]
var ownerId : Optional[str]

The ownerId of a LoginDetails should start with U-

var password : Optional[str]
var rememberMe : Optional[str]
var secretMachineId : str

See the generate class in the neos.secrets module.

var username : Optional[str]
class NeosAudio (id: str, globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], name: str, recordType: RecordType, path: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, lastModificationTime: datetime.datetime, visits: int, rating: int, ownerId: str)

Representation of a NeosVR audio.

Expand source code
@dataclass
class NeosAudio(NeosRecord):
    """Representation of a NeosVR audio."""
    pass

Ancestors

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

Representation of NeosVR clound variable.

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

Class variables

var eTag : Optional[str]
var ownerId : str

The ownerId of a NeosCloudVar should start with U-

var partitionKey : str
var path : str

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

var rowKey : str
var timestamp : str
var value : str
class NeosCloudVarDefs (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)

NeosCloudVarDefs(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 NeosCloudVarDefs:
    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 NeosDirectory (id: str, globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], name: str, recordType: RecordType, path: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, lastModificationTime: datetime.datetime, visits: int, rating: int, ownerId: str, lastModifyingMachineId: Optional[str], ownerName: str, tags: List[str], creationTime: Optional[datetime.datetime])

Representation of a NeosVR directory.

Expand source code
@dataclass
class NeosDirectory(NeosRecord):
    """Representation of a NeosVR directory."""
    lastModifyingMachineId: Optional[str]
    ownerName: str
    tags: List[str]
    creationTime: Optional[datetime]

    @property
    def content_path(self) -> str:
        return str(PureWindowsPath(self.path, self.name))

Ancestors

Class variables

var creationTime : Optional[datetime.datetime]
var lastModifyingMachineId : Optional[str]
var ownerName : str
var tags : List[str]

Instance variables

var content_path : str
Expand source code
@property
def content_path(self) -> str:
    return str(PureWindowsPath(self.path, self.name))
class NeosFriend (id: str, friendUsername: str, friendStatus: FriendStatus, isAccepted: bool, userStatus: UserStatusData, profile: Optional[ProfileData], latestMessageTime: datetime.datetime)

Representation of a NeosVR friend.

Expand source code
@dataclass
class NeosFriend:
    """Representation of a NeosVR friend."""
    id: str
    friendUsername: str
    friendStatus: FriendStatus
    isAccepted: bool
    userStatus: UserStatusData
    profile: Optional[ProfileData]
    latestMessageTime: datetime

Class variables

var friendStatusFriendStatus
var friendUsername : str
var id : str
var isAccepted : bool
var latestMessageTime : datetime.datetime
var profile : Optional[ProfileData]
var userStatusUserStatusData

Representation of a NeosVR link.

Expand source code
@dataclass
class NeosLink(NeosRecord):
    """Representation of a NeosVR link."""
    assetUri: ParseResult

Ancestors

Class variables

var assetUri : urllib.parse.ParseResult
class NeosMessage (id: str, senderId: str, ownerId: str, sendTime: str, recipientId: str, messageType: NeosMessageType, content: str)

Representation of a NeosVR message.

Expand source code
@dataclass
class NeosMessage:
    """Representation of a NeosVR message."""
    id: str
    senderId: str
    ownerId: str
    """The ownerId of a NeosMessage should start with `U-`"""
    sendTime: str
    recipientId: str
    messageType: NeosMessageType
    content: str

Class variables

var content : str
var id : str
var messageTypeNeosMessageType
var ownerId : str

The ownerId of a NeosMessage should start with U-

var recipientId : str
var sendTime : str
var senderId : str
class NeosMessageType (value, names=None, *, module=None, qualname=None, type=None, start=1)

An enumeration.

Expand source code
class NeosMessageType(Enum):
    TEXT = "Text"
    OBJECT = "Object"
    SOUND = "Sound"
    SESSIONINVITE = "SessionInvite"
    CREDITTRANSFER = "CreditTransfer"
    SUGARCUBES = "SugarCubes"

Ancestors

  • enum.Enum

Class variables

var CREDITTRANSFER
var OBJECT
var SESSIONINVITE
var SOUND
var SUGARCUBES
var TEXT
class NeosObject (id: str, globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], name: str, recordType: RecordType, path: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, lastModificationTime: datetime.datetime, visits: int, rating: int, ownerId: str, assetUri: str, lastModifyingMachineId: str, ownerName: str, tags: List[str], creationTime: datetime.datetime)

Represenation of a NeosVR object.

Expand source code
@dataclass
class NeosObject(NeosRecord):
    """Represenation of a NeosVR object."""
    assetUri: str
    lastModifyingMachineId: str
    ownerName: str
    tags: List[str]
    creationTime: datetime

Ancestors

Class variables

var assetUri : str
var creationTime : datetime.datetime
var lastModifyingMachineId : str
var ownerName : str
var tags : List[str]
class NeosRecord (id: str, globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], name: str, recordType: RecordType, path: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, lastModificationTime: datetime.datetime, visits: int, rating: int, ownerId: str)

Representation of a NeosVR record.

Expand source code
@dataclass
class NeosRecord:
    """Representation of a NeosVR record."""
    id: str
    globalVersion: int
    localVersion: int
    lastModifyingUserId: Optional[str]
    name: str
    recordType: RecordType
    path: Optional[str]
    isPublic: bool
    isForPatrons: bool
    isListed: bool
    isDeleted: bool
    lastModificationTime: datetime
    visits: int
    rating: int
    ownerId: str

Subclasses

Class variables

var globalVersion : int
var id : str
var isDeleted : bool
var isForPatrons : bool
var isListed : bool
var isPublic : bool
var lastModificationTime : datetime.datetime
var lastModifyingUserId : Optional[str]
var localVersion : int
var name : str
var ownerId : str
var path : Optional[str]
var rating : int
var recordTypeRecordType
var visits : int
class NeosTexture (id: str, globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], name: str, recordType: RecordType, path: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, lastModificationTime: datetime.datetime, visits: int, rating: int, ownerId: str)

Representation of a NeosVR texture.

Expand source code
@dataclass
class NeosTexture(NeosRecord):
    """Representation of a NeosVR texture."""
    pass

Ancestors

class NeosUser (id: str, username: str, normalizedUsername: str, email: Optional[str], registrationDate: datetime.datetime, isVerified: bool, quotaBytes: Optional[int], isLocked: bool, accountBanExpiration: Optional[datetime.datetime], publicBanExpiration: Optional[datetime.datetime], spectatorBanExpiration: Optional[datetime.datetime], muteBanExpiration: Optional[datetime.datetime], usedBytes: Optional[int], profile: Optional[ProfileData], credits: Optional[CreditData], NCRdepositAddress: Optional[str], patreonData: Optional[PatreonData], tags: Optional[List[str]] = <factory>)

Representation of a NeosVR user.

Expand source code
@dataclass
class NeosUser:
    """Representation of a NeosVR user."""
    id: str
    username: str
    normalizedUsername: str
    email: Optional[str]
    registrationDate: datetime
    isVerified: bool
    quotaBytes: Optional[int]
    isLocked: bool
    accountBanExpiration: Optional[datetime]
    publicBanExpiration: Optional[datetime]
    spectatorBanExpiration: Optional[datetime]
    muteBanExpiration: Optional[datetime]
    usedBytes: Optional[int]
    profile: Optional[ProfileData]
    credits: Optional[CreditData]
    NCRdepositAddress: Optional[str]
    patreonData: Optional[PatreonData]
    tags: Optional[List[str]] = field(default_factory=list)

Class variables

var NCRdepositAddress : Optional[str]
var accountBanExpiration : Optional[datetime.datetime]
var credits : Optional[CreditData]
var email : Optional[str]
var id : str
var isLocked : bool
var isVerified : bool
var muteBanExpiration : Optional[datetime.datetime]
var normalizedUsername : str
var patreonData : Optional[PatreonData]
var profile : Optional[ProfileData]
var publicBanExpiration : Optional[datetime.datetime]
var quotaBytes : Optional[int]
var registrationDate : datetime.datetime
var spectatorBanExpiration : Optional[datetime.datetime]
var tags : Optional[List[str]]
var usedBytes : Optional[int]
var username : str
class NeosUserStatus (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)

Represenation of a NeosVR user status.

Expand source code
@dataclass
class NeosUserStatus:
    """Represenation of a NeosVR user status."""
    onlineStatus: OnlineStatus
    lastStatusChange: datetime
    currentSessionAccessLevel: int
    currentSessionHidden: bool
    currentHosting: bool
    compatibilityHash: Optional[str]
    neosVersion: Optional[str]
    publicRSAKey: Optional[PublicRSAKey]
    OutputDevice: Optional[str]
    isMobile: bool

Class variables

var OutputDevice : Optional[str]
var compatibilityHash : Optional[str]
var currentHosting : bool
var currentSessionAccessLevel : int
var currentSessionHidden : bool
var isMobile : bool
var lastStatusChange : datetime.datetime
var neosVersion : Optional[str]
var onlineStatusOnlineStatus
var publicRSAKey : Optional[PublicRSAKey]
class NeosWorld (id: str, globalVersion: int, localVersion: int, lastModifyingUserId: Optional[str], name: str, recordType: RecordType, path: Optional[str], isPublic: bool, isForPatrons: bool, isListed: bool, isDeleted: bool, lastModificationTime: datetime.datetime, visits: int, rating: int, ownerId: str)

Representation of a NeosVR world.

Expand source code
@dataclass
class NeosWorld(NeosRecord):
    """Representation of a NeosVR world."""
    pass

Ancestors

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

Representation of an online status.

Expand source code
class OnlineStatus(Enum):
    """Representation of an online status."""
    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], lastPatreonPledgeCents: int, lastTotalCents: int, minimumTotalUnits: int, externalCents: int, lastExternalCents: int, hasSupported: bool, lastIsAnorak: bool, priorityIssue: int, lastPlusActivationTime: datetime.datetime, lastActivationTime: datetime.datetime, lastPlusPledgeAmount: int, lastPaidPledgeAmount: int, accountName: str, currentAccountType: int, currentAccountCents: int, pledgedAccountType: int)

Representation of a NeosVR Patreon data.

Expand source code
@dataclass
class PatreonData:
    """Representation of a NeosVR Patreon data."""
    isPatreonSupporter: bool
    patreonId: Optional[str]
    lastPatreonPledgeCents: int
    lastTotalCents: int
    minimumTotalUnits: int
    externalCents: int
    lastExternalCents: int
    hasSupported: bool
    lastIsAnorak: bool
    priorityIssue: int
    lastPlusActivationTime: datetime
    lastActivationTime: datetime
    lastPlusPledgeAmount: int
    lastPaidPledgeAmount: int
    accountName: str
    currentAccountType: int
    currentAccountCents: int
    pledgedAccountType: int

Class variables

var accountName : str
var currentAccountCents : int
var currentAccountType : int
var externalCents : int
var hasSupported : bool
var isPatreonSupporter : bool
var lastActivationTime : datetime.datetime
var lastExternalCents : int
var lastIsAnorak : bool
var lastPaidPledgeAmount : int
var lastPatreonPledgeCents : int
var lastPlusActivationTime : datetime.datetime
var lastPlusPledgeAmount : int
var lastTotalCents : int
var minimumTotalUnits : int
var patreonId : Optional[str]
var pledgedAccountType : int
var priorityIssue : int
class ProfileData (iconUrl: Optional[str], tokenOutOut: Optional[List[str]])

Representation of a NeosVR profile data.

Expand source code
@dataclass
class ProfileData:
    """Representation of a NeosVR profile data."""
    iconUrl: Optional[str]
    tokenOutOut: Optional[List[str]]

Class variables

var iconUrl : Optional[str]
var tokenOutOut : Optional[List[str]]
class PublicRSAKey (Exponent: str, Modulus: str)

Representation of a public key.

Expand source code
@dataclass
class PublicRSAKey:
    """Representation of a public key."""
    Exponent: str
    Modulus: str

Class variables

var Exponent : str
var Modulus : str
class RecordType (value, names=None, *, module=None, qualname=None, type=None, start=1)

Representation of the type of a NeosVR record.

Expand source code
class RecordType(Enum):
    """Representation of the type of a NeosVR record."""
    OBJECT = "object"
    LINK = "link"
    DIRECTORY = "directory"
    WORLD = "world"
    TEXTURE = "texture"
    AUDIO = "audio"

Ancestors

  • enum.Enum

Class variables

var AUDIO
var DIRECTORY
var OBJECT
var TEXTURE
var WORLD
class Session (activeSessions: Optional[str], activeUsers: int, compatibilityHash: Optional[str], correspondingWorldId: Optional[WorldId], description: Optional[str], hasEnded: bool, headlessHost: bool, hostMachineId: str, hostUserId: Optional[str], hostUsername: str, isValid: bool, joinedUsers: int, lastUpdate: datetime.datetime, maxUsers: int, mobileFriendly: bool, name: str, neosVersion: str, normalizedSessionId: str, sessionBeginTime: datetime.datetime, sessionId: str, sessionURLs: List[str], sessionUsers: List[SessionUser], tags: List[str], thumbnail: Optional[str], totalActiveUsers: int, totalJoinedUsers: int)

Representation of a session.

Expand source code
@dataclass
class Session:
    """Representation of a session."""
    activeSessions: Optional[str]
    activeUsers: int
    compatibilityHash: Optional[str]
    correspondingWorldId: Optional[WorldId]
    description: Optional[str]
    hasEnded: bool
    headlessHost: bool
    hostMachineId: str
    hostUserId: Optional[str]
    hostUsername: str
    isValid: bool
    joinedUsers: int
    lastUpdate: datetime
    maxUsers: int
    mobileFriendly: bool
    name: str
    neosVersion: str
    normalizedSessionId: str
    sessionBeginTime: datetime
    sessionId: str
    sessionURLs: List[str]
    sessionUsers: List[SessionUser]
    tags: List[str]
    thumbnail: Optional[str]
    totalActiveUsers: int
    totalJoinedUsers: int

Class variables

var activeSessions : Optional[str]
var activeUsers : int
var compatibilityHash : Optional[str]
var correspondingWorldId : Optional[WorldId]
var description : Optional[str]
var hasEnded : bool
var headlessHost : bool
var hostMachineId : str
var hostUserId : Optional[str]
var hostUsername : str
var isValid : bool
var joinedUsers : int
var lastUpdate : datetime.datetime
var maxUsers : int
var mobileFriendly : bool
var name : str
var neosVersion : str
var normalizedSessionId : str
var sessionBeginTime : datetime.datetime
var sessionId : str
var sessionURLs : List[str]
var sessionUsers : List[SessionUser]
var tags : List[str]
var thumbnail : Optional[str]
var totalActiveUsers : int
var totalJoinedUsers : int
class SessionUser (isPresent: bool, userID: Optional[str], username: str)

Representation of a session user.

Expand source code
@dataclass
class SessionUser:
    """Representation of a session user."""
    isPresent: bool
    userID: Optional[str]
    username: str

Class variables

var isPresent : bool
var userID : Optional[str]
var username : str
class UserStatusData (activeSessions: Optional[List[Session]], currentSession: Optional[Session], compatibilityHash: Optional[str], currentHosting: bool, currentSessionAccessLevel: CurrentSessionAccessLevel, currentSessionHidden: bool, currentSessionId: Optional[str], isMobile: bool, lastStatusChange: datetime.datetime, neosVersion: Optional[str], onlineStatus: OnlineStatus, OutputDevice: Optional[str], publicRSAKey: Optional[PublicRSAKey])

Representation of a NeosVR user status data.

Expand source code
@dataclass
class UserStatusData:
    """Representation of a NeosVR user status data."""
    activeSessions: Optional[List[Session]]
    currentSession: Optional[Session]
    compatibilityHash: Optional[str]
    currentHosting: bool
    currentSessionAccessLevel: CurrentSessionAccessLevel
    currentSessionHidden: bool
    currentSessionId: Optional[str]
    isMobile: bool
    lastStatusChange: datetime
    neosVersion: Optional[str]
    onlineStatus: OnlineStatus
    OutputDevice: Optional[str]
    publicRSAKey: Optional[PublicRSAKey]

Class variables

var OutputDevice : Optional[str]
var activeSessions : Optional[List[Session]]
var compatibilityHash : Optional[str]
var currentHosting : bool
var currentSession : Optional[Session]
var currentSessionAccessLevelCurrentSessionAccessLevel
var currentSessionHidden : bool
var currentSessionId : Optional[str]
var isMobile : bool
var lastStatusChange : datetime.datetime
var neosVersion : Optional[str]
var onlineStatusOnlineStatus
var publicRSAKey : Optional[PublicRSAKey]
class WorldId (ownerId: str, recordId: str)

Representation of a world id.

Expand source code
@dataclass
class WorldId:
    """Representation of a world id."""
    ownerId: str
    """The ownerId of a WorldId should start with `U-`"""
    recordId: str

Class variables

var ownerId : str

The ownerId of a WorldId should start with U-

var recordId : str