pytwitcherapi.session
¶
API for communicating with twitch
Classes¶
OAuthSession () |
Session with oauth2 support. |
TwitchSession () |
Session for making requests to the twitch api |
Functions¶
needs_auth (meth) |
Wraps a method of TwitchSession and raises an exceptions.NotAuthorizedError if before calling the method, the session isn’t authorized. |
Data¶
AUTHORIZATION_BASE_URL |
Authorisation Endpoint |
CLIENT_ID |
The client id of pytwitcher on twitch. |
SCOPES |
The scopes that PyTwitcher needs |
TWITCH_APIURL |
The baseurl for the old twitch api |
TWITCH_HEADER_ACCEPT |
The header for the Accept key to tell twitch which api version it should use |
TWITCH_KRAKENURL |
The baseurl for the twitch api |
TWITCH_STATUSURL |
str(object=’‘) -> string |
TWITCH_USHERURL |
The baseurl for the twitch usher api |
absolute_import |
|
log |
Instances of the Logger class represent a single logging channel. |
-
pytwitcherapi.session.
needs_auth
(meth)[source]¶ Wraps a method of
TwitchSession
and raises anexceptions.NotAuthorizedError
if before calling the method, the session isn’t authorized.Parameters: meth – Returns: the wrapped method Return type: Method Raises: None
-
pytwitcherapi.session.
AUTHORIZATION_BASE_URL
= 'https://api.twitch.tv/kraken/oauth2/authorize'¶ Authorisation Endpoint
-
pytwitcherapi.session.
CLIENT_ID
= '642a2vtmqfumca8hmfcpkosxlkmqifb'¶ The client id of pytwitcher on twitch. Use environment variable
PYTWITCHER_CLIENT_ID
or pytwitcher default value.
-
pytwitcherapi.session.
SCOPES
= ['user_read', 'chat_login']¶ The scopes that PyTwitcher needs
-
pytwitcherapi.session.
TWITCH_APIURL
= 'http://api.twitch.tv/api/'¶ The baseurl for the old twitch api
-
pytwitcherapi.session.
TWITCH_HEADER_ACCEPT
= 'application/vnd.twitchtv.v3+json'¶ The header for the
Accept
key to tell twitch which api version it should use
-
pytwitcherapi.session.
TWITCH_KRAKENURL
= 'https://api.twitch.tv/kraken/'¶ The baseurl for the twitch api
-
pytwitcherapi.session.
TWITCH_STATUSURL
= 'http://twitchstatus.com/api/status?type=chat'¶ str(object=’‘) -> string
Return a nice string representation of the object. If the argument is a string, the return value is the same object.
-
pytwitcherapi.session.
TWITCH_USHERURL
= 'http://usher.twitch.tv/api/'¶ The baseurl for the twitch usher api
-
pytwitcherapi.session.
absolute_import
= _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)¶
-
pytwitcherapi.session.
log
= <logging.Logger object>[source]¶ Instances of the Logger class represent a single logging channel. A “logging channel” indicates an area of an application. Exactly how an “area” is defined is up to the application developer. Since an application can have any number of areas, logging channels are identified by a unique string. Application areas can be nested (e.g. an area of “input processing” might include sub-areas “read CSV files”, “read XLS files” and “read Gnumeric files”). To cater for this natural nesting, channel names are organized into a namespace hierarchy where levels are separated by periods, much like the Java or Python package namespace. So in the instance given above, channel names might be “input” for the upper level, and “input.csv”, “input.xls” and “input.gnu” for the sub-levels. There is no arbitrary limit to the depth of nesting.