" go test -v -cover Usage Example File: package main import ( "log" "os" "github.com/knspriggs/go-twi" /> " go test -v -cover Usage Example File: package main import ( "log" "os" "github.com/knspriggs/go-twi" /> " go test -v -cover Usage Example File: package main import ( "log" "os" "github.com/knspriggs/go-twi"/>

A golang client for the Twitch v3 API - public APIs only (for now)

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

Similar Resources

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs

PnPjs is a fluent JavaScript API for consuming SharePoint and Microsoft Graph REST APIs in a type-safe way. You can use it with SharePoint Framework,

Dec 23, 2022

Simple-api - Create Simple `Hello World` APIs from Various Programming Languages

simple-api Create Simple `Hello World` APIs from Various Programming Languages.

Jan 18, 2022

rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources.

rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org     account access, and private resources.

rpCheckup - Catch AWS resource policy backdoors like Endgame rpCheckup is an AWS resource policy security checkup tool that identifies public, externa

Dec 26, 2022

Alibaba Cloud jarvis-public SDK for Go

English | 简体中文 Alibaba Cloud jarvis-public SDK for Go Requirements It's necessary for you to make sure your system have installed Go environment which

Jan 19, 2022

Program to fetch public IP ranges of AWS, Azure and Google

cloudip This program will retrieve a list of all public IP address ranges (v4 or v6) for the three major cloud vendors: Amazon AWS, Microsoft Azure an

Aug 21, 2022

A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Kinesumer is a Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Jan 5, 2023

Twilight is an unofficial Golang SDK for Twilio APIs

Twilight is an unofficial Golang SDK for Twilio APIs

Twilight is an unofficial Golang SDK for Twilio APIs. Twilight was born as a result of my inability to spell Twilio correctly. I searched for a Twillio Golang client library and couldn’t find any, I decided to build one. Halfway through building this, I realized I had spelled Twilio as Twillio when searching for a client library on Github.

Jul 2, 2021

Opensea-go - Golang's library for OpenSea APIs

opensea-go Golang's library for OpenSea APIs (https://docs.opensea.io/reference)

Nov 26, 2022

A Github Action to auto approve pull requests that contain only document reviews.

Approve documentation review A Github Action to auto approve pull requests that contain only document reviews. The Cloud Platform team have a document

Dec 23, 2021
📼 Automatic Twitch Recorder

?? rekōdā - Automatic Twitch Recorder Rekōdā, レコダ - means Recorder in Japanese Is a CLI tool inspired by streamlink but with more capabilities. Mainly

Dec 7, 2022
Chat bot for twitch

Microbot Chat bot for twitch. Run You need to provide config and cred files.

Oct 23, 2021
Go API Client for NASA's Open APIs

Go Client for Nasa Open APIs Description The Go Client for Nasa Open APIs is a Go Client for the following Nasa Open APIs: APOD: Astronomy Picture of

Sep 24, 2021
A pay later service to allow our users to buy goods from a merchant now, and then allow them to pay for those goods at a later date.

simple-pay-later A pay later service to allow our users to buy goods from a merchant now, and then allow them to pay for those goods at a later date.

Dec 11, 2021
An experiment which attempts to create streams similar to what is available in Java now that we have generics in Go.

go-streams An experiment which attempts to create streams similar to what is available in Java now that we have generics. Should I use this library? N

Aug 9, 2022
lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin to AWS Lambda and Amazon API Gateway.

aws-lambda-go-api-proxy makes it easy to run Golang APIs written with frameworks such as Gin with AWS Lambda and Amazon API Gateway.

Jan 6, 2023
A site displaying musical groups information by receiving a public API. The server was written in Go.
A site displaying musical groups information by receiving a public API. The server was written in Go.

A site displaying musical groups information by receiving a public API. The API consists of 4 parts with each represent a subset of the information. W

Dec 13, 2021
Clusterpedia-client - clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Jan 7, 2022
Client-go - Clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Dec 5, 2022
The MinIO Admin Go Client SDK provides APIs to manage MinIO services

Golang Admin Client API Reference The MinIO Admin Golang Client SDK provides APIs to manage MinIO services. This quickstart guide will show you how to

Dec 30, 2022