A Twitch Wrapper for Python 3.6 or higher for the new Twitch API
Project description
TwitchAPI Wrapper
A Twitch Wrapper for Python 3.6 or higher for the new Twitch API with its App Token
Installation
pip install twitch-MagicaFreak
Getting Started
To start a session with Twitch you just use:
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
Now to get something from the Twitch App you just use your name and the function you want. As an example:
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.user('MagicaFreak')
##Functions All the functions that exist at the moment
Twitch User
It gets the user by his username
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.user('Username')
This can be done for multiple users too
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.user(['Username1', 'Username2', 'Username3'])
And it returns a list of users that you searched for
Twitch Stream
It gets the stream that is live by the name of the streamer
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.stream('Streamername')
This can be done for multiple streams too
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.stream(['Streamername1', 'Streamername2', 'Streamername3'])
And it returns a list of streams that you searched for
Twitch Tags
It gets the tag by the tag ID
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.tag('tag ID')
This can be done for multiple tags too
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.tag(['tagID1', 'tagID2', 'tagID3'])
And it returns a list of tags that you searched for
Twitch game
It gets the game by its name
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.game('game name')
This can be done for multiple games too
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.game(['gamename1', 'gamename2', 'gamename3'])
And it returns a list of the games that you searched for
Twitch Top Games
It gets the top games of the moment
from twitch.twitch import Twitch
async with Twitch("client_id","client_secret") as example_name:
await example_name.top_games()
And it returns a list of the top games
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file twitch-MagicaFreak-1.0.0.tar.gz
.
File metadata
- Download URL: twitch-MagicaFreak-1.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9af6c3d0ada6aecabd04327e40f22acbe2809c6603e5bd435197e9f9b30d5e5 |
|
MD5 | ead596ec24c18bc6d83a546443d0e44f |
|
BLAKE2b-256 | da5d8f21e201bda33a90c82be1cbaab588b8a998560fa9ade612866a0eedbaec |
File details
Details for the file twitch_MagicaFreak-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: twitch_MagicaFreak-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92deb9af819637fc20b2a20e05b30d3f56a6d476b801d415360e473442626413 |
|
MD5 | 68d5c646a6410edc0311700ad9071785 |
|
BLAKE2b-256 | dbd3653630ee0eaf158337cc926759c9d3d5a0e92c2ed059375e5ef2b797d859 |