We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running twitch api get users/extensions -q user_id=<user id>, the cli panics.
twitch api get users/extensions -q user_id=<user id>
All
twitch api get users/extensions -q user_id=57047445
> twitch api get users/extensions -q user_id=57047445 panic: interface conversion: interface {} is map[string]interface {}, not []interface {} goroutine 1 [running]: github.com/twitchdev/twitch-cli/internal/api.NewRequest({0xaa8a42, 0x3}, {0xc000127d48, 0x11}, {0xc0000900e0, 0x1, 0xc0000a2500?}, {0xf698a8, 0x0, 0x0}, ...) /go/src/github.com/twitchdev/twitch-cli/internal/api/api.go:178 +0x11c5 github.com/twitchdev/twitch-cli/cmd.cmdRun(0x98c8a0?, {0xc0000a61e0?, 0x3?, 0x3?}) /go/src/github.com/twitchdev/twitch-cli/cmd/api.go:127 +0x2b0 github.com/spf13/cobra.(*Command).execute(0x98c8a0, {0xc0000a61b0, 0x3, 0x3}) /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x663 github.com/spf13/cobra.(*Command).ExecuteC(0x98da20) /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x39d github.com/spf13/cobra.(*Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897 github.com/twitchdev/twitch-cli/cmd.Execute() /go/src/github.com/twitchdev/twitch-cli/cmd/root.go:26 +0x25 main.main() /go/src/github.com/twitchdev/twitch-cli/main.go:16 +0x50
The text was updated successfully, but these errors were encountered:
This is caused by the response being formatted differently than every other response. Its sent out as:
{ "data": { "panel": { "1": { "active": true, "id": "rh6jq1q334hqc2rr1qlzqbvwlfl3x0", "version": "1.1.0", "name": "TopClip" }, "2": { "active": true, "id": "wi08ebtatdc7oj83wtl9uxwz807l8b", "version": "1.1.8", "name": "Streamlabs Leaderboard" }, "3": { "active": true, "id": "naty2zwfp7vecaivuve8ef1hohh6bo", "version": "1.0.9", "name": "Streamlabs Stream Schedule & Countdown" } }, "overlay": { "1": { "active": true, "id": "zfh2irvx2jb4s60f02jq0ajm8vwgka", "version": "1.0.19", "name": "Streamlabs" } }, "component": { "1": { "active": true, "id": "lqnf3zxk0rv0g7gq92mtmnirjz2cjj", "version": "0.0.1", "name": "Dev Experience Test", "x": 0, "y": 0 }, "2": { "active": false } } } }
Or in production:
{ "data": { "panel": { "1": { "active": false }, "2": { "active": false }, "3": { "active": false } }, "overlay": { "1": { "active": true, "id": "wph0p912gucvcee0114kfoukn319db", "version": "0.0.3", "name": "Companion of the Lamb" } }, "component": { "1": { "active": false }, "2": { "active": false } } } }
Sorry, something went wrong.
Xemdo
Successfully merging a pull request may close this issue.
What is the problem?
When running
twitch api get users/extensions -q user_id=<user id>
, the cli panics.Operating System
All
Architecture Version (x86, x64, arm, etc)
All
Steps to reproduce
twitch api get users/extensions -q user_id=57047445
Any User ID should do.
Relevant log output
The text was updated successfully, but these errors were encountered: