Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 710 Bytes

games_docs.md

File metadata and controls

45 lines (35 loc) · 710 Bytes

Games Documentation

Get Games

This is an example of how to get games.

client, err := helix.NewClient(&helix.Options{
    ClientID: "your-client-id",
})
if err != nil {
    // handle error
}

resp, err := client.GetGames(&helix.GamesParams{
    Names: []string{"Sea of Thieves", "Fortnite"},
})
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)

Get Top Games

This is an example of how to get top games.

client, err := helix.NewClient(&helix.Options{
    ClientID: "your-client-id",
})
if err != nil {
    // handle error
}

resp, err := client.GetTopGames(&helix.TopGamesParams{
    First: 20,
})
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)