Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .codegen/data/twitch_api_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ var Endpoints = []*TwitchAPIEndpoint{
BroadcasterID string `query:"-,required"`
HasDelay bool `query:"-"`
}{},
Response: BasicResponse[api.Clip]{},
Response: BasicResponse[api.EditableClip]{},
},
{
// https://dev.twitch.tv/docs/api/reference/#get-clips
Expand Down Expand Up @@ -792,9 +792,9 @@ var Endpoints = []*TwitchAPIEndpoint{
"# Authorization", "", "Requires an app access token or user access token that includes the editor:manage:clips or channel:manage:clips scope.",
},
Params: struct {
ClipID string `query:"clip_id,required"`
EditorID string `query:"-"`
BroadcasterID string `query:"-"`
ClipID string `query:"clip_id"`
EditorID string `query:"editor_id"`
BroadcasterID string `query:"broadcaster_id"`
}{},
Response: BasicResponse[api.DownloadableClip]{},
},
Expand Down Expand Up @@ -1596,6 +1596,23 @@ var Endpoints = []*TwitchAPIEndpoint{
}{},
Response: BasicResponse[api.User]{},
},
{
// https://dev.twitch.tv/docs/api/reference/#get-authorization-by-user
Resource: UsersAuthorizationResource,
Name: "Authorization",
Method: http.MethodGet,
Path: api.EndpointUsersGetAuthorizationByUser,
DocsURL: "#get-authorization-by-user",
Comments: []string{
"Gets the authorization scopes that the specified user(s) have granted the application.", "",
"# Limits", "", "You may fetch the authorization information for a maximum of 10 users per request.", "",
"# Authorization", "", "Requires a user access token.",
},
Params: struct {
UserID []string `query:"user_id,required"`
}{},
Response: BasicResponse[api.UserAuthorization]{},
},
// Videos
{
// https://dev.twitch.tv/docs/api/reference/#get-videos
Expand Down
4 changes: 3 additions & 1 deletion .codegen/data/twitch_api_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ var (
// TeamsChannelsResource is the resource for the Twitch Teams Channels API
TeamsChannelsResource = NewTwitchAPIResource("Channels")
// UsersResource is the resource for the Twitch Users API
UsersResource = NewTwitchAPIResource("Users")
UsersResource = NewTwitchAPIResource("Users", UsersAuthorizationResource)
// UsersAuthorizationResource is the resource for the Twitch Users Authorization API
UsersAuthorizationResource = NewTwitchAPIResource("Authorization")
// VideosResource is the resource for the Twitch Videos API
VideosResource = NewTwitchAPIResource("Videos")
// WhispersResource is the resource for the Twitch Whispers API
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -coverprofile=coverage.out -covermode=atomic -coverpkg=./... -timeout 300s -v ./...
run: go test -coverprofile=coverage.out -covermode=atomic -timeout 300s -v ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# go-twitch [![GoDoc](https://godoc.org/github.com/Adeithe/go-twitch?status.svg)](https://godoc.org/github.com/Adeithe/go-twitch) [![Go Report Card](https://goreportcard.com/badge/github.com/Adeithe/go-twitch?style=flat-square)](https://goreportcard.com/report/github.com/Adeithe/go-twitch) [![Codecov](https://img.shields.io/codecov/c/github/adeithe/go-twitch?style=flat-square&logo=codecov&label=codecov)](https://codecov.io/github/adeithe/go-twitch)
# go-twitch [![GoDoc](https://godoc.org/github.com/adeithe/go-twitch?status.svg)](https://godoc.org/github.com/adeithe/go-twitch) [![Go Report Card](https://goreportcard.com/badge/github.com/adeithe/go-twitch?style=flat-square)](https://goreportcard.com/report/github.com/adeithe/go-twitch) [![Codecov](https://img.shields.io/codecov/c/github/adeithe/go-twitch?style=flat-square&logo=codecov&label=codecov)](https://codecov.io/github/adeithe/go-twitch)

The go-twitch library is a complete interface for Twitch services. It is designed to be easy to use and allows for easy integration into any project.

Expand Down
Loading
Loading