RESTapi
-
Hello everyone,
I seem to be having trouble build a URL to fetch data on the Player Schema. Currently I can find a player using
wp-json/sportspress/v2/players?slug=PLAYERNAMEbut I’ve run into an issue. If a player has requested a name change, the slug stays the same but their Rendered name is different. Now in order to remember these changes to look up the correct slug either involves using a database for our app to bind the new-name to slug or remembering what it was. Now with over 2500+ members it’s highly unlikely that our moderators/admins will remember everyone’s sign up name.My question is this:
Is there a way to look up a players “rendered” name using a URL and retreiving the json data as if we used.../v2/players?slug=NAMEor is there any other way?
The topic ‘RESTapi’ is closed to new replies.