PetterKraabol / Twitch-Python

Object-oriented Twitch API for Python developers
https://pypi.org/project/twitch-python
MIT License
213 stars 37 forks source link

Documentation #11

Closed CodeSpent closed 4 years ago

CodeSpent commented 4 years ago

Opening issue for improving on current documentation as the few examples are lacking of documenting the rest of the library. I'm happy to help contribute this.

I will continue to update this issue with progress and roadmap as I work through this.

PetterKraabol commented 4 years ago

Hi, there are some additional examples in the wiki, however, hand-written documentation is prone to be outdated.

Modern editors (I use intelliJ) will give you hints that should be enough to explore the library. I use type hints in my Python code to tag variable types, which should also be picked up by most editors.

Screenshot 2020-01-14 at 21 54 10 Screenshot 2020-01-14 at 21 56 28

Most API functions take **kwargs, which are forwarded to api requests to provide optional parameters defined in the Twitch API Reference. As such, you can

for video in helix.user('username').videos(first=10, type='highlight'):
    print(video.title)