Comments (1)
Hello, @chenei
Thanks for your comment and sorry for the delay.
Currently, the futbin API that we call to get and filter players only supports up to the 10th page. As can be seen in the example below:
package main
import (
"fmt"
"github.com/matheusfm/futbin/players"
)
func main() {
playersClient := players.DefaultClient()
var all []players.Player
for i := 1; i < 100; i++ {
fmt.Printf("Page %d...\t", i)
p, err := playersClient.Get(&players.Options{Page: i})
if err != nil {
fmt.Printf("ERROR: %v\n", err)
break
}
fmt.Printf("%d players returned\n", len(p))
if len(p) <= 0 {
break
}
all = append(all, p...)
}
fmt.Printf("Total: %d\n", len(all))
}
Output:
$ go run test.go
Page 1... 32 players returned
Page 2... 32 players returned
Page 3... 32 players returned
Page 4... 32 players returned
Page 5... 32 players returned
Page 6... 32 players returned
Page 7... 32 players returned
Page 8... 32 players returned
Page 9... 32 players returned
Page 10... 32 players returned
Page 11... 0 players returned
Total: 320
The API is https://www.futbin.org/futbin/api/getFilteredPlayers?page=1
from futbin.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from futbin.