package main import ( "context" "fmt" "log" "os" "time" "git.lehouerou.net/laurent/sorare" "git.lehouerou.net/laurent/sorare/graphql" ) func main() { token := os.Getenv("JWTTOKEN") audience := os.Getenv("JWTAUDIENCE") if token == "" { log.Fatal("No token provided") } if audience == "" { log.Fatal("No audience provided") } api := sorare.New() api.SetJWTToken( graphql.JwtToken{ Token: token, ExpiredAt: time.Time{}, }, audience, ) ctx := context.Background() cu, err := api.Country.Get(ctx, graphql.SlugParams{Slug: "fr"}) if err != nil { panic(err) } fmt.Println(cu) }