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