Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 980 Bytes

requests.rst

File metadata and controls

24 lines (18 loc) · 980 Bytes

Requests

Custom requests

You can also issue custom requests. The pytwitcherapi.TwitchSession is actually a subclass of requests.Session. So basically you can use pytwitcherapi.TwitchSession.request to issue arbitrary requests. To make it easier to use the different twitch APIs there are a few helpers.

You can get easy access to three different twitch APIs:

  • Kraken API witch uses pytwitcherapi.session.TWITCH_KRAKENURL. Use pytwitcherapi.session.TwitchSession.kraken_request.
  • Usher API with uses pytwitcherapi.session.TWITCH_USHERURL. Use pytwitcherapi.session.TwitchSession.usher_request.
  • The old twitch API pytwitcherapi.session.TWITCH_APIURL. Use pytwitcherapi.session.TwitchSession.oldapi_request.

/snippets/apirequest.py