Library Classes

Exceptions

This module contains custom exception types.

exception aiosu.exceptions.APIException(status: int, message: str = '')

API Exception Class

Parameters:
  • status (int) – status code from the API

  • message (str, optional) – error message returned, defaults to “”

exception aiosu.exceptions.InvalidClientRequestedError(message: str = '')

Invalid Client Requested Error

Parameters:

message (str, optional) – error message, defaults to “”

exception aiosu.exceptions.RefreshTokenExpiredError(message: str = '')

Refresh Token Expired Error

Parameters:

message (str, optional) – error message, defaults to “”

Events

This module contains base classes for library events.

class aiosu.events.BaseEvent

Abstract for event classes

class aiosu.events.ClientAddEvent(session_id: int, client: Eventable)

Event for when a client is added

session_id: int

0 if app client

client: Eventable

The client that was added

class aiosu.events.ClientUpdateEvent(client: Eventable, old_token: OAuthToken, new_token: OAuthToken)

Event for when a client is updated

client: Eventable
old_token: OAuthToken
new_token: OAuthToken
class aiosu.events.Eventable

Abstract for classes that handle events