Plugin Contributor
Savvas
(@savvasha)
Hi @renpersonal ,
You need to change the player number limit from Sportspress->Settings.
Thanks,
Savvas
Hi Savvas, I changed limit player to 200 and unchecked pagination in the tab players on settings, but only 10 players are returned by de api.
I executed the request with postman.
Plugin Contributor
Savvas
(@savvasha)
Same result, only 10 players are returned.
Plugin Contributor
Savvas
(@savvasha)
Can you share the exact request you are using?
Hi, adding the parameter “?per_page=X” works fine.
Plugin Contributor
Savvas
(@savvasha)
Thanks for sharing the solution! 🙂 I am marking it as solven then.
Thanks,
Savvas
Another question Savvas? It’s possible to create events player vs player with api’s.
Plugin Contributor
Savvas
(@savvasha)
Have you some example to use inside a plugin in wordpress?
Plugin Contributor
Savvas
(@savvasha)
Not sure about how to use it in a plugin, but using Postman you can add the following as the body of your request:
{
"title": "My Event Title",
"mode": "player"
}
and the by using the POST call for the url https://domain.com/wp-json/sportspress/v2/events/
you can create a new event with title My Event Title in player mode.
You will need an authentication of course before posting anything 🙂
Thanks Savva, works fine.
About the parameter “per_page” is limit to 100, and it’s necessary use parameter “page” to request next pages.
Hi there!
Yes, that’s set by WP itself.
Thanks!