Open alexf91 opened 5 years ago
The Twitch API returns the user who owns the bearer token when no arguments are provided to https://api.twitch.tv/helix/users.
https://api.twitch.tv/helix/users
If neither a user ID nor a login name is specified, the user is looked up by Bearer token. https://dev.twitch.tv/docs/api/reference/#get-users
This is currently not possible, because of this check: https://github.com/PetterKraabol/Twitch-Python/blob/104c0bc0c8dbb3a1292a45a4d0838cc8222aba82/twitch/helix/resources/users.py#L44
To keep the API consistent, this behavior should probably only be added for Helix.user() and not to Helix.users(). This way there is no confusion when an empty user list is requested. Otherwise, an empty user list could return a non-empty result.
Helix.user()
Helix.users()
I have implemented it here, but it seems a bit hacky: https://github.com/PetterKraabol/Twitch-Python/compare/master...alexf91:current_user
Seems no progress here..
The Twitch API returns the user who owns the bearer token when no arguments are provided to
https://api.twitch.tv/helix/users
.This is currently not possible, because of this check: https://github.com/PetterKraabol/Twitch-Python/blob/104c0bc0c8dbb3a1292a45a4d0838cc8222aba82/twitch/helix/resources/users.py#L44
To keep the API consistent, this behavior should probably only be added for
Helix.user()
and not toHelix.users()
. This way there is no confusion when an empty user list is requested. Otherwise, an empty user list could return a non-empty result.I have implemented it here, but it seems a bit hacky: https://github.com/PetterKraabol/Twitch-Python/compare/master...alexf91:current_user