API ๐Ÿ”Œ#

This is where the api wrappers and endpoints are held.

NovaAPI Reference#

class novauniverse.api.NovaAPI(endpoint: str = None)[source]#

Bases: object

The main class that handles all requests to the web server at https://novauniverse.net/api/.

get() dict | list[source]#

Send a get request to that endpoint.

property is_online: bool#

NovaCDN Reference#

class novauniverse.api.cdn.NovaCDN(endpoint: str = None, silence_endpoint_warning: bool = False)[source]#

Bases: NovaAPI

Class used to interact with CDN server at https://novauniverse.net/cdn/.

get() Response[source]#

Send a get request to that CDN endpoint.

is_cdn_endpoint() bool[source]#

Check if this endpoint link is from the CDN and warns you if itโ€™s not.

Endpoints Reference#

class novauniverse.api.endpoints.CDNEndpoints[source]#

Bases: object

Class containing all Nova Universe CDN endpoints.

NOVA_GAMES_ICONS_TEAM = 'https://novauniverse.net/cdn/novagames/icons/team'#
class novauniverse.api.endpoints.Endpoints[source]#

Bases: object

Class containing all Nova Universe API endpoints.

MCF_RESULT = 'https://api.novauniverse.net/v1/tournaments/mcf/result'#
NEWS_ALL = 'https://novauniverse.net/api/news/all'#
NEWS_LATEST = 'https://novauniverse.net/api/news/latest'#
NOVA_GAMES_DYNAMIC_CONFIGURATION = 'https://novauniverse.net/api/nova_games/dynamic_configuration'#
NOVA_GAMES_LIVE_STATS = 'https://novauniverse.net/api/nova_games/live_stats'#
NOVA_GAMES_RESULT = 'https://api.novauniverse.net/v1/tournaments/nova_games/result'#
PLAYERS_ONLINE = 'https://api.novauniverse.net/v1/novauniverse_mc/players/online'#
STATS_DISCORD = 'https://api.novauniverse.net/v1/discord'#
STATS_EXTENDED = 'https://api.novauniverse.net/v1/novauniverse_mc/stats/extended'#
connectivity_check = 'https://api.novauniverse.net/v1/connectivity_check'#

Errors Reference#

exception novauniverse.api.errors.FailedConnectivityCheck[source]#

Bases: NovaAPIError

Raised when failed to connect to Nova Universe API.

exception novauniverse.api.errors.NoEndpointPassed[source]#

Bases: NovaAPIError

Raised when no endpoint is passed to NovaAPI.

exception novauniverse.api.errors.NovaAPIError(message: str)[source]#

Bases: NovaError

Error raised when a known error occurs on the API.

exception novauniverse.api.errors.UnSuccessfulOperation(message_from_api)[source]#

Bases: NovaAPIError

Raised when Nova Universe API returns unsuccessful operation.