TwitchAPIConnection does not allow you to get_users() without specifying names or ids #43

Open
opened 2024-06-23 07:59:40 +02:00 by KyleReese · 0 comments
KyleReese commented 2024-06-23 07:59:40 +02:00 (Migrated from github.com)

According to the Twitch API docs you can get information about the user of your current bearer token if you do a get-users request without specifying specific names or ids to get information about.

For example this allows you to get the username of a user from just the auth bearer token.

However, the get_users function of TwitchAPIConnection immediately returns an empty dictionary if you do not provide either names or ids. Ideally this method should still perform the no param request with just the token to get this information.

I think getting info about the user of the current token is useful and the immediate return if the names and ids arrays are empty should be removed from this function to allow this.

According to the [Twitch API docs](https://dev.twitch.tv/docs/api/reference/#get-users) you can get information about the user of your current bearer token if you do a get-users request without specifying specific names or ids to get information about. For example this allows you to get the username of a user from just the auth bearer token. However, the get_users function of TwitchAPIConnection immediately returns an empty dictionary if you do not provide either names or ids. Ideally this method should still perform the no param request with just the token to get this information. I think getting info about the user of the current token is useful and the immediate return if the names and ids arrays are empty should be removed from this function to allow this.
Sign in to join this conversation.
No description provided.