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

create_custom_reward has the wrong URL #153

Closed dewiniaid closed 1 year ago

dewiniaid commented 1 year ago

Attempting to create a custom channel reward with create_custom_reward fails because the endpoint URL is wrong.

The code in particular reads:

        return await self._build_result('POST', 'channel_points/custom/rewards', param, AuthType.USER, [AuthScope.CHANNEL_MANAGE_REDEMPTIONS],
                                        CustomReward, body_data=body, error_handler=error_handler)

but should probably read:

        return await self._build_result('POST', 'channel_points/custom_rewards', param, AuthType.USER, [AuthScope.CHANNEL_MANAGE_REDEMPTIONS],
                                        CustomReward, body_data=body, error_handler=error_handler)

(note the underscore rather than the slash in custom_rewards)