Update examples to use Competition instead of SoccerSeason.
parent
d0afff06fc
commit
883bfcf113
|
@ -31,14 +31,14 @@ func main() {
|
||||||
WithToken("<insert your api token here>")
|
WithToken("<insert your api token here>")
|
||||||
|
|
||||||
// Get list of seasons...
|
// Get list of seasons...
|
||||||
seasons, err := client.SoccerSeasons().Do()
|
competitions, err := client.Competitions().Do()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...and print them
|
// ...and print them
|
||||||
for _, season := range seasons {
|
for _, competition := range competitions {
|
||||||
fmt.Println(season.Id, season.Caption)
|
fmt.Println(competition.Id, competition.Caption)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,14 @@ func Example() {
|
||||||
WithToken("<insert your api token here>")
|
WithToken("<insert your api token here>")
|
||||||
|
|
||||||
// Get list of seasons...
|
// Get list of seasons...
|
||||||
seasons, err := client.SoccerSeasons().Do()
|
competitions, err := client.Competitions().Do()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...and print them
|
// ... and print them.
|
||||||
for _, season := range seasons {
|
for _, competition := range competitions {
|
||||||
fmt.Println(season.Id, season.Caption)
|
fmt.Println(competition.Id, competition.Caption)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,12 +34,12 @@ func ExampleClient() {
|
||||||
|
|
||||||
// Do something with the client instance...
|
// Do something with the client instance...
|
||||||
// Here we just fetch the listed soccer seasons on the API
|
// Here we just fetch the listed soccer seasons on the API
|
||||||
seasons, err := client.SoccerSeasons().Do()
|
competitions, err := client.Competitions().Do()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
for _, season := range seasons {
|
for _, competition := range competitions {
|
||||||
fmt.Println(season.Id, season.Caption)
|
fmt.Println(competition.Id, competition.Caption)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue