GoValo is a Valorant Client API library built for go. Designed for simplicity and ease of use you can get up in running in a few lines of code.
package main
import (
"fmt"
"github.com/itsbradn/govalo"
)
func main() {
api, err := govalo.Setup("na", USERNAME, PASSWORD)
if err != nil {
fmt.Print(err)
return
}
userinfo, err := valapi.GetUserInfo()
if err != nil {
fmt.Print(err)
return
}
fmt.Printf("%s#%s\n", userinfo.Account.GameName, userinfo.Account.TagLine)
}
func main() {
api, err := govalo.Setup("na", USERNAME, PASSWORD)
if err != nil {
fmt.Print(err)
return
}
userinfo, err := valapi.GetUserInfo()
if err != nil {
fmt.Print(err)
return
}
history, err := valapi.GetMatchHistory(userinfo.PlayerUUID, &govalo.MatchHistoryOptions{
StartIndex: 0
EndIndex: 5
})
if err != nil {
fmt.Print(err)
return
}
fmt.Printf("Most recent match: %s\n", history.History[0].MatchID)
}
func main() {
api, err := govalo.Setup("na", USERNAME, PASSWORD)
if err != nil {
fmt.Print(err)
return
}
userinfo, err := valapi.GetUserInfo()
if err != nil {
fmt.Print(err)
return
}
competitiveUpdates, err := valapi.GetCompetitiveUpdates(userinfo.PlayerUUID, &govalo.CompetitiveUpdatesOptions{
StartIndex: 0
EndIndex: 5
})
if err != nil {
fmt.Print(err)
return
}
fmt.Printf("Most recent competitive update: %s\n", competitiveUpdates.Matches[0])
}