twitch-cli icon indicating copy to clipboard operation
twitch-cli copied to clipboard

[Feature Request] Update of Mock-API to Match Latest Live Twitch API Published May '21

Open Bootlegclan opened this issue 3 years ago • 0 comments

Recently Twitch announced a update to the live API's https://discuss.dev.twitch.tv/t/announcing-apis-and-eventsub-for-polls-and-predictions/31539

However upon testing the latest Twitch CLI Mock-API it appears that they are not a reflection of each other. I would like to request that the Mock-API be updated as the changes that were made in the last update are specific to Twitch Partner Features (Polls/Predictions). These features are inaccessible on the live platform without having Partner status and I believe the Mock-API was developed to assist to remove the barrier of development for these restricted features.

Please find below my test queries showing the Mock-API not allowing features that are listed on the latest documentation. (Client/Secret/Auth are replaced with Mock Info).

curl -X POST 'http://localhost:8080/mock/predictions' \
-H 'Authorization: Bearer 5a867e772ef86eb' \
-H 'Client-Id: 5b75b31c3445cc9f38c1730f10db60' \
-H 'Content-Type: application/json' \
-d '{ 
	"broadcaster_id": "36006691",
	"title": "New Prediction Title",
	"outcomes": 
		[{
				"title": "Outcome Option0"
			}, {
				"title": "Outcome Option1"
			}, {
				"title": "Outcome Option2"
			}, {
				"title": "Outcome Option3"
		}],
	"prediction_window": 120
}'

Failed Response

{
    "status": 400,
    "error": "Bad Request",
    "message": "outcomes must be exactly 2 items"
}

Bootlegclan avatar Jun 08 '22 20:06 Bootlegclan