Events API Reference

class kxspy.events.Event[source]

Bases: BaseObject

The class is a base event for websocket.

class kxspy.events.IdentifyEvent(uuid: str)[source]

Bases: Event

IdentifyEvent. call when the websocket is ready.

uuid: str
class kxspy.events.ExchangejoinEvent(gameId: str, exchangeKey: str)[source]

Bases: Event

Event on exchange join.

gameId: str
exchangeKey: str
class kxspy.events.ExchangeOnlineEvent(username: str, v: str)[source]

Bases: Event

Event on exchange key online.

username: str
v: str
class kxspy.events.ExchangeOfflineEvent(username: str)[source]

Bases: Event

Event on exchange key offline.

username: str
class kxspy.events.ExchangeGameAliveEvent(alive: int)[source]

Bases: Event

Event on exchange key Game Alive.

alive: int
class kxspy.events.ExchangeGameEnd(username: str, kills: int, damageDealt: int, damageTaken: int, duration: str, position: str, isWin: bool, stuff: Stuff)[source]

Bases: Event

Event on exchange key Game End.

username: str
kills: int
damageDealt: int
damageTaken: int
duration: str
position: str
isWin: bool
stuff: Stuff
class kxspy.events.BroadCasteEvent(msg: str)[source]

Bases: Event

Event on broadcaste.

msg: str
class kxspy.events.HelloEvent(heartbeat_interval: int)[source]

Bases: Event

Event on hello.

heartbeat_interval: int
class kxspy.events.HeartBeatEvent(ok: bool, count: int, players: list)[source]

Bases: Event

Event on heartbeat.

ok: bool
count: int
players: list
class kxspy.events.ConfirmGameStart(ok: bool, usernameChanged: bool)[source]

Bases: Event

Event on ConfirmGameStart.

ok: bool
usernameChanged: bool
class kxspy.events.GameStart(ok: bool, system: bool, players: list)[source]

Bases: Event

Event on GameStart.

ok: bool
system: bool
players: list
class kxspy.events.GameEnd(left: str)[source]

Bases: Event

Event on GameEnd.

left: str
class kxspy.events.ConfirmGameEnd(ok: bool)[source]

Bases: Event

Event on GameEnd.

ok: bool
class kxspy.events.KillEvent(killer: str, killed: str, timestamp: int)[source]

Bases: Event

Event on KillEvent.

killer: str
killed: str
timestamp: int
class kxspy.events.VersionUpdate(v: str)[source]

Bases: Event

Event on VersionUpdate.

v: str
class kxspy.events.ChatMessage(user: str, text: str, timestamp: int, system: bool)[source]

Bases: Event

Event on ChatMessage.

user: str
text: str
timestamp: int
system: bool
class kxspy.events.ConfirmChatMessage(ok: bool)[source]

Bases: Event

Event on ChatMessageConfirm.

ok: bool
class kxspy.events.VoiceData(d: list, u: str)[source]

Bases: Event

Event on VoiceData.

d: list
u: str
class kxspy.events.VoiceChatUpdate(user: str, isVoiceChat: bool)[source]

Bases: Event

Event on VoiceChatUpdate.

user: str
isVoiceChat: bool
class kxspy.events.ConfirmVoiceChatUpdate(ok: bool)[source]

Bases: Event

Event on ConfirmVoiceChatUpdate.

ok: bool
class kxspy.events.ErrorEvent(op: int, event: str, error: str)[source]

Bases: Event

Event on ErrorEvent.

op: int
event: str
error: str