0
Answered

JSON API output

TomTom 2 weeks ago in Settings updated by Andrei S. (Developer) 1 week ago 4

Already sent an email to ask about this, but I figured someone here may also know. Is there any way to get the list of matches in JSON from this plugin?  can see it's possible to manually export CSV or XML, but I need to link to my own backend for linking to other data

Answering here for the sake of others, Andrei confirmed this is not possible, so I ended up just grabbing the data directly from the database, not ideal but it works!

Searching answer

I don't plan to add such functionality to the plugin.

But if you're interested, I can create a tutorial on how to do that. It isn't complex—I think it's about 10 lines of code.


--

Best Regards

Andrei S.

That would be excellent, I have been meaning to learn about working with Wordpress, this could be a great start :)

Answered

Hi


Here are brief tutorials on enabling PUBLIC API access to all your saved games.

1) Install and activate FL Templater plugin

https://github.com/anwppro/anwp-fl-templater/releases/download/v0.1.0/anwp-fl-templater.zip

2) Open file anwp-fl-templater.php for editing and add the code from the gist to the bottom

https://gist.github.com/anwppro/98df192271a27e897145033ff58cd284

Image 10662

3) Open <your website>/wp-json/fl/games and test


Image 10660

4) Optional

- Change * to DB table fields you need. 

Image 10661


- If you have thousands of games, consider adding a "page" argument to prevent the memory_limit error.

--

Best Regards

Andrei S.