classmethod splatnet3_scraper.query.QueryHandler.from_session_token(session_token, *, prefix='')

Creates a new instance of the class using a session token.

Given a session token, this method will create a new instance of the class with a valid session token already set in the Config object. This method is useful if the user already has a session token and does not want to generate an accompanying GTOKEN and BULLET_TOKEN.

Parameters:
session_token : str

The session token to use. This token must be valid and not expired or revoked. If the token is invalid, the user will not be able to make any queries to the SplatNet 3 API.

prefix : str

The prefix to use for the configuration options. This is useful if the user wants to use multiple instances of the class with different tokens. Defaults to “SN3S”.

Returns:

QueryHandler – A new instance of the class with a valid session token already set in the Config object. The GTOKEN and BULLET_TOKEN will also have been generated and set in the Config object.