twitchoauth

package module
v0.0.0-...-3fdf770 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 8 Imported by: 1

README

twitchOAuth

It's a little hacky so far, so there is certainly room for improvements, but it works!

Usage

It's fairly simple to use in the current state all you really need is your client id


package main

import "github.com/simplyserenity/twitchOAuth"

func main(){
  scopes := []string{"chat_login", "user_read"}
  token, err := twitchAuth.GetToken(<clientID>, scopes);
  if err != nil {
    panic(err)
  }
}

And that's it really, the user's browser will open and they'll be asked to verify, and the token should make its way back to you.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(clientid string, scopes []string) (token string, err error)

GetToken returns the the twitch token or an error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL