Teekeks / pyTwitchAPI

A Python 3.7 compatible implementation of the Twitch API, EventSub, PubSub and Chat
https://pytwitchapi.dev
MIT License
256 stars 38 forks source link

Question about the parameter of time. #165

Closed jd0252 closed 1 year ago

jd0252 commented 1 year ago

Hello,

I want to get videos from a specified Twitcher after 2022.

Here is my code:

start=twitchAPI.helper.datetime_to_str(start) twitch.get_videos(user_id="user_id", after =start)

I got an error message: TwitchAPIException: Bad Request - The cursor specified in the before or after query parameter is not valid.

What is the correct form of the time parameter?

Teekeks commented 1 year ago

after is the parameter used for pagination (which you should most likely never need to touch in the new library version). You are probably looking for period.

More info in the documentation here: https://pytwitchapi.readthedocs.io/en/latest/modules/twitchAPI.twitch.html#twitchAPI.twitch.Twitch.get_videos