From d52a228a6bc1d7892e9887ce31c8d6f28009a6ad Mon Sep 17 00:00:00 2001 From: Joel Hill Date: Fri, 28 Dec 2018 11:20:34 -0800 Subject: [PATCH] updated readme and example --- README.md | 8 ++++---- examples/example.go | 9 ++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 72ec356..88fadc7 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,15 @@ Go library to use MySportsFeeds API ``` import ( - "context" - msf "github.com/joelhill/mysportsfeeds-go" ) -ctx := context.Context authorization := "Basic asfafasdfasdfasdfasasdfsadfasdfsd" config := msf.NewConfig(authorization) client := msf.NewService(config) options := client.NewSeasonalGamesOptions() -games, statusCode, err := client.SeasonalGames(ctx, options) +games, statusCode, err := client.SeasonalGames(options) +if err != nil { + log.Println("something went wrong") +} ``` \ No newline at end of file diff --git a/examples/example.go b/examples/example.go index 4572bf4..ee88a53 100644 --- a/examples/example.go +++ b/examples/example.go @@ -1,20 +1,15 @@ package main import ( - "context" - "github.com/davecgh/go-spew/spew" - sf "github.com/joelhill/mysportsfeeds-go" ) func main() { - config := sf.NewConfig("Basic afsdfasdfasdfsadffdfasdfadffas") - + config := sf.NewConfig("Basic changethisheresothatitworks") client := sf.NewService(config) - c := context.Background() dailyGameOptions := client.NewDailyGamesOptions() - dg, statusCode, dgErr := client.DailyGames(c, dailyGameOptions) + dg, statusCode, dgErr := client.DailyGames(dailyGameOptions) spew.Dump(dg) spew.Dump(statusCode)