rankade.RankadeExceptions

Module Contents

API

exception RankadeException(message: str)[source]

Bases: Exception

Base Exception, should not be raised directly.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception ApiErrorResponse(url: str, verb: str, status: int, code: str = '', message: str = '')[source]

Bases: rankade.RankadeExceptions.RankadeException

Base class for error response from API. Raised when no appropriate ApiErrorResponse subclass.

Raised from:

Parameters:
  • url (str) – URL queried.

  • verb (str) – HTTP Method used.

  • status (str) – Request HTTP status code.

  • code (str) – API error code.

  • message (str) – API error message.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception AuthCredentials(url: str, verb: str, status: int, code: str = '', message: str = '')[source]

Bases: rankade.RankadeExceptions.ApiErrorResponse

Code will be β€œA001” or β€œA002”, raised when key and/or secret are invalid or access has been disabled.

Raised from:

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception MatchValidation(url: str, verb: str, status: int, code: str = '', message: str = '')[source]

Bases: rankade.RankadeExceptions.ApiErrorResponse

Code will begin with β€œM” and message will contain contain details of validation error with the match.

Raised from:

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception NoValidCredentials(message: str = 'No Credentials Supplied')[source]

Bases: rankade.RankadeExceptions.RankadeException

Raised when either no key & secret or no token has been supplied to main Rankade class.

Raised from:

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception Quotas(url: str, verb: str, status: int, code: str = '', message: str = '')[source]

Bases: rankade.RankadeExceptions.ApiErrorResponse

Code will begin with β€œQ” and message will contain details of the quota limit reached. Status should be either 429 or 202.

Raised from:

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception SearchTooShort(search: str = '')[source]

Bases: rankade.RankadeExceptions.RankadeException

Raised when search term is less than 2 characters. API will return missing or invalid parameters which is not useful.

Raised from:

Initialization

Initialize self. See help(type(self)) for accurate signature.