-
Notifications
You must be signed in to change notification settings - Fork 0
/
espn.go
36 lines (30 loc) · 876 Bytes
/
espn.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package gofantasy
// import (
// "context"
// "github.com/gofantasy/model/espn"
// )
// type IEspnClient interface {
// GetLeague(ctx context.Context, leagueID string) (*espn.League, error)
// }
// type espnClient struct {
// baseUrl string
// baseClient *client
// }
// var _ IEspnClient = &espnClient{}
// func (e *espnClient) GetLeague(ctx context.Context, leagueID string) (*espn.League, error) {
// }
// func (e *espnClient) get(ctx context.Context, endpoint string) (*eahoo, error) {
// if e.baseClient.cache != nil {
// v, exist := e.baseClient.cache.Get(ctx, endpoint)
// if exist {
// }
// }
// _, err := e.baseClient.requestor.Get(ctx, endpoint, &fc, jsonDecorator, &jsonDecoder{})
// if err != nil {
// return nil, err
// }
// if e.baseClient.cache != nil {
// e.baseClient.cache.Add(ctx, endpoint, &fc)
// }
// return &fc, nil
// }