go-twitch-helix

Go library for accessing the new Twitch-API.
Additional api calls are available for some Twitch v5 Api, to fill in the gaps until the new Api is complete.
Usage
To install go-twitch-helix run the command:
$ go get github.com/Julusian/go-twitch-helix
Full docs at GoDocs
Here's an example program that gets the top 10 twitch games:
package main
import (
"fmt"
"log"
"net/http"
"os"
"github.com/Julusian/go-twitch-helix/helix"
"github.com/Julusian/go-twitch-helix/twitch"
)
func main() {
client := twitch.NewApiClient(&http.Client{}, os.Getenv("CLIENT_ID"))
opts := &helix.StreamsParams{
Limit: 10,
}
res, rate, err := helix.GetStreams(client, opts)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Rate limiter %d/%d remaining", rate.Remaining, rate.Limit)
for i, s := range res.Data {
fmt.Printf("%d - %s (%d)\n", i+1, s.Title, s.ID)
}
}
Authentication
TODO
License
All files under this repository fall under the MIT License (see the file LICENSE).