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: floatClass variables
var CDFT : floatvar KFC : floatvar 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 ANYONEvar FRIENDSvar FRIENDSOFFRIENDSvar LANvar PRIVATEvar 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 ACCEPTEDvar IGNOREDvar NONEvar 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.""" passAncestors
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 : strvar path : str-
The path of a NeosCloudVar should start with a
U-for a user owned path and aG-for a group owned path. var rowKey : strvar timestamp : strvar 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: strClass variables
var defaultValue : Optional[str]var definitionOwnerId : strvar deleteScheduled : boolvar eTag : strvar listPermissions : List[str]var partitionKey : strvar readPermissions : List[str]var rowKey : strvar subpath : strvar timestamp : strvar variableType : strvar 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
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: datetimeClass variables
var friendStatus : FriendStatusvar friendUsername : strvar id : strvar isAccepted : boolvar latestMessageTime : datetime.datetimevar profile : Optional[ProfileData]var userStatus : UserStatusData
class NeosLink (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: urllib.parse.ParseResult)-
Representation of a NeosVR link.
Expand source code
@dataclass class NeosLink(NeosRecord): """Representation of a NeosVR link.""" assetUri: ParseResultAncestors
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: strClass variables
var content : strvar id : strvar messageType : NeosMessageTypevar ownerId : str-
The ownerId of a NeosMessage should start with
U- var recipientId : strvar sendTime : strvar 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 CREDITTRANSFERvar OBJECTvar SESSIONINVITEvar SOUNDvar SUGARCUBESvar 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: datetimeAncestors
Class variables
var assetUri : strvar creationTime : datetime.datetimevar lastModifyingMachineId : strvar ownerName : 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: strSubclasses
Class variables
var globalVersion : intvar id : strvar isDeleted : boolvar isForPatrons : boolvar isListed : boolvar isPublic : boolvar lastModificationTime : datetime.datetimevar lastModifyingUserId : Optional[str]var localVersion : intvar name : strvar ownerId : strvar path : Optional[str]var rating : intvar recordType : RecordTypevar 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.""" passAncestors
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 : strvar isLocked : boolvar isVerified : boolvar muteBanExpiration : Optional[datetime.datetime]var normalizedUsername : strvar patreonData : Optional[PatreonData]var profile : Optional[ProfileData]var publicBanExpiration : Optional[datetime.datetime]var quotaBytes : Optional[int]var registrationDate : datetime.datetimevar spectatorBanExpiration : Optional[datetime.datetime]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: boolClass variables
var OutputDevice : Optional[str]var compatibilityHash : Optional[str]var currentHosting : boolvar currentSessionAccessLevel : intvar currentSessionHidden : boolvar isMobile : boolvar lastStatusChange : datetime.datetimevar neosVersion : Optional[str]var onlineStatus : OnlineStatusvar 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.""" passAncestors
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 AWAYvar BUSYvar OFFLINEvar 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 GROUPvar INVALIDvar MACHINGvar 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: intClass variables
var accountName : strvar currentAccountCents : intvar currentAccountType : intvar externalCents : intvar hasSupported : boolvar isPatreonSupporter : boolvar lastActivationTime : datetime.datetimevar lastExternalCents : intvar lastIsAnorak : boolvar lastPaidPledgeAmount : intvar lastPatreonPledgeCents : intvar lastPlusActivationTime : datetime.datetimevar lastPlusPledgeAmount : intvar lastTotalCents : intvar minimumTotalUnits : intvar patreonId : Optional[str]var pledgedAccountType : intvar 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: strClass variables
var Exponent : strvar 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 AUDIOvar DIRECTORYvar LINKvar OBJECTvar TEXTUREvar 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: intClass variables
var activeSessions : Optional[str]var activeUsers : intvar compatibilityHash : Optional[str]var correspondingWorldId : Optional[WorldId]var description : Optional[str]var hasEnded : boolvar headlessHost : boolvar hostMachineId : strvar hostUserId : Optional[str]var hostUsername : strvar isValid : boolvar joinedUsers : intvar lastUpdate : datetime.datetimevar maxUsers : intvar mobileFriendly : boolvar name : strvar neosVersion : strvar normalizedSessionId : strvar sessionBeginTime : datetime.datetimevar sessionId : strvar sessionURLs : List[str]var sessionUsers : List[SessionUser]var thumbnail : Optional[str]var totalActiveUsers : intvar 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: strClass variables
var isPresent : boolvar 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 : boolvar currentSession : Optional[Session]var currentSessionAccessLevel : CurrentSessionAccessLevelvar currentSessionHidden : boolvar currentSessionId : Optional[str]var isMobile : boolvar lastStatusChange : datetime.datetimevar neosVersion : Optional[str]var onlineStatus : OnlineStatusvar 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: strClass variables
var ownerId : str-
The ownerId of a WorldId should start with
U- var recordId : str