Skip to content

Commit

Permalink
Merge pull request #2 from joelhill/update-example
Browse files Browse the repository at this point in the history
updated readme and example
  • Loading branch information
Joel Hill authored Dec 28, 2018
2 parents ecb5e16 + d52a228 commit 1e7e065
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```
9 changes: 2 additions & 7 deletions examples/example.go
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 1e7e065

Please sign in to comment.