splatnet3_scraper.auth.TokenManager(nso=None, f_token_url=['https://api.imink.app/f', 'https://nxapi-znca-api.fancy.org.uk/api/znca/f'], *, env_manager=None, origin='memory', origin_data=None)

Initializes a TokenManager object. The TokenManager object handles the tokens used for authentication. It handles regeneration and interaction with the keychain. This class is meant to mostly be used via its “get” method.

Parameters:
nso : NSO | None

An instance of the NSO class. If one is not provided, a new instance will be created. Defaults to None.

f_token_url : str | list[str] | None

The URL(s) to use to generate tokens. If a list is provided, each URL will be tried in order until a token is successfully generated. If None is provided, the default URL provided by imink will be used. Defaults to None.

env_manager : EnvironmentVariablesManager | None

An instance of the EnvironmentVariablesManager class. If one is not provided, a new instance will be created. Defaults to None.

origin : ORIGIN

The origin of the tokens. Defaults to “memory”. One of “memory”, “env”, or “file”.

origin_data : str | None

The data associated with the origin. If the origin is “memory” or “env”, this is ignored. If the origin is “file”, this should be the path to the file. Defaults to None.

Raises:

ValueError – If the NSO object does not have a session token.