-
classmethod splatnet3_scraper.query.QueryHandler.from_tokens(session_token, gtoken=
None, bullet_token=None, *, prefix='') Creates a new instance of the class using the tokens provided.
Given a session token, a
GTOKEN, and aBULLET_TOKEN, this method will create a new instance of the class with all the tokens already set in theConfigobject. This method is useful if the user already has all the tokens and wants to avoid having to generate them again if possible. If the user does not have all the tokens, they can pass inNonefor the tokens they do not have and the method will generate the tokens that are missing.- 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.
- gtoken : str | None¶
The
GTOKENto use. If None, the method will generate a newGTOKEN. Defaults to None.- bullet_token : str | None¶
The
BULLET_TOKENto use. If None, the method will generate a newBULLET_TOKEN. Defaults to None.- 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 all the tokens already set in the
Configobject.