• Resolved robaduncan

    (@robaduncan)


    I am trying to use the API to load player stats which include the Player positions. The data comes with players positions for rugby i.e. 1, 6, 12 but I need to match these to Loosehead Prop, Blindside Flanker and Inside Centre. These are recorded as the ‘Order’ (class=”sp_order column-sp_order”) but it does not show on the API. How can I add this to the API?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter robaduncan

    (@robaduncan)

    Sorry I have answered my own question – the order is inherent in the WordPress sort Order so the following presents the records in the right order so I can count the position number based on sequence and derive the player number alignment.

    {{site}}/wp-json/sportspress/v2/positions?_fields=id,name,slug&order=asc

Viewing 1 replies (of 1 total)
  • The topic ‘Positions API’ is closed to new replies.