Popularity
2.3
Growing
Activity
0.0
Stable
19
5
1

Programming language: Go
Tags: Third-party APIs    
Latest version: v1.0

go-twitch alternatives and similar packages

Based on the "Third-party APIs" category

Do you think we are missing an alternative of go-twitch or a related project?

Add another 'Third-party APIs' Package

README

Build Status

go-twitch

Test

CLIENT_ID="<my client ID>" go test -v -cover

Usage

Example File:

package main

import (
  "log"
  "os"

  "github.com/knspriggs/go-twitch"
)

var clientID string

func init() {
  clientID = os.Getenv("CLIENT_ID")
}

func main() {
  twitchSession, err := twitch.NewSession(twitch.NewSessionInput{ClientID: clientID})
  if err != nil {
    log.Fatalln(err)
  }

  searchChannelsInput := twitch.SearchChannelsInputType{
    Query: "knspriggs",   // see https://github.com/justintv/Twitch-API/blob/master/v3_resources/search.md for query syntax
    Limit: 2,             // optional
    Offset: 0,            // optional
  }

  resp, err := twitchSession.SearchChannels(&searchChannelsInput)
  if err != nil {
    log.Fatalln(err)
  }
  log.Printf("Resp: \n%#v", resp)
}
CLIENT_ID="<my client ID>" go run example/main.go

To get a client ID see the documentation from the Twitch API https://github.com/justintv/Twitch-API/blob/master/authentication.md