Skip to content
New issue

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

Update User Extension endpoint using GET instead of PUT #392

Closed
theca11 opened this issue Sep 13, 2022 · 2 comments
Closed

Update User Extension endpoint using GET instead of PUT #392

theca11 opened this issue Sep 13, 2022 · 2 comments
Labels

Comments

@theca11
Copy link
Contributor

theca11 commented Sep 13, 2022

Bug Report

Update User Extensions endpoint is missing method: 'PUT' and thus getting called instead with GET

async updateMyActiveExtensions(data: HelixUserExtensionUpdatePayload): Promise<HelixInstalledExtensionList> {
const result = await this._client.callApi<{ data: HelixInstalledExtensionListData }>({
type: 'helix',
url: 'users/extensions',
jsonBody: { data }
});
return new HelixInstalledExtensionList(result.data);
}

Apart from that (which I could have PRed myself as it's trivial), note that it's missing scopes also. However, this one is a little tricky. Both user:edit:broadcast (mentioned in the API reference) and channel:manage:extensions (mentioned in the scopes page) are valid scopes. In #343 support for scopes equivalencies was added, but they're defined in a Map and user:edit:broadcast is already linked to channel:manage:broadcast. So I don't know what approach (if any) you wanna take regarding scopes for this endpoint.

Expected behavior

To send a PUT api call

Actual Behavior

Sends a GET with body data, throwing back an error: Request with GET/HEAD method cannot have body

Environment

  • Version: 5.2
  • Node version: 16.15.1
  • Operating system: Win10
@theca11 theca11 added the bug label Sep 13, 2022
@zunderscore
Copy link
Contributor

zunderscore commented Sep 13, 2022

I imagine we would want to err on the side of the official documentation for that call (https://dev.twitch.tv/docs/api/reference#update-user-extensions) and make it user:edit:broadcast.

@theca11
Copy link
Contributor Author

theca11 commented Sep 13, 2022

The scopes page is also official documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants