Update examples to use Competition instead of SoccerSeason.

develop
Icedream 2016-07-09 21:06:13 +02:00
parent d0afff06fc
commit 883bfcf113
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
2 changed files with 10 additions and 10 deletions

View File

@ -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)
} }
} }

View File

@ -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)
} }
} }