Skip to content

Commit

Permalink
consuming fifa 23 database
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusfm committed Sep 20, 2022
1 parent ab61980 commit ef85b4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions players/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type client struct {
}

func (c client) Get(opt *Options) ([]Player, error) {
u, _ := url.Parse("https://www.futbin.org/futbin/api/getFilteredPlayers")
u, _ := url.Parse("https://www.futbin.org/futbin/api/23/getFilteredPlayers")
pq := newPlayerQuery(opt)
q, err := query.Values(pq)
if err != nil {
Expand All @@ -39,15 +39,15 @@ func (c client) Get(opt *Options) ([]Player, error) {
}

func (c client) TOTW() ([]Player, error) {
return c.get("https://www.futbin.org/futbin/api/currentTOTW")
return c.get("https://www.futbin.org/futbin/api/23/currentTOTW")
}

func (c client) Popular() ([]Player, error) {
return c.get("https://www.futbin.org/futbin/api/getPopularPlayers")
return c.get("https://www.futbin.org/futbin/api/23/getPopularPlayers")
}

func (c client) Latest() ([]Player, error) {
return c.get("https://www.futbin.org/futbin/api/newPlayers")
return c.get("https://www.futbin.org/futbin/api/23/newPlayers")
}

func (c client) get(url string) ([]Player, error) {
Expand Down

0 comments on commit ef85b4b

Please sign in to comment.