A website for my game dev stuff that supports chat, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
812 B

package main
import (
"fmt"
"github.com/nicklaw5/helix/v2"
)
func main() {
client, err := helix.NewClient(&helix.Options{
ClientID: "57116762594c61061237ed15fcdf0f",
APIBaseURL: "http://127.0.0.1:8081/mock",
AppAccessToken: "a2bc8f684ea663d",
})
if err != nil { panic(err) }
resp, err := client.GetUsers(&helix.UsersParams{
IDs: []string{"64812820"},
Logins: []string{"marcusjill866"},
})
if err != nil { panic(err) }
fmt.Printf("Status code: %d\n", resp.StatusCode)
fmt.Printf("Rate limit: %d\n", resp.GetRateLimit())
fmt.Printf("Rate limit remaining: %d\n", resp.GetRateLimitRemaining())
fmt.Printf("Rate limit reset: %d\n\n", resp.GetRateLimitReset())
for _, user := range resp.Data.Users{
fmt.Printf("ID: %s Name: %s", user.ID, user.DisplayName)
}
}