This is good point, JSON based endpoints are great. I re-write WP api to my own api used custom endpoints (only GET). It brings hell lot more speed to the page. But then I made it to save data to JSON and it is just crazy fast. Examples: svw.no – Nuxt, Polylang, over 3k posts and pages, then maritimpolitikk.no – NUXT, multisite, polylang, hunderts of posts, each sub site is a /year actually, lvk.no (one of many in the network) NUXT, multisite, where each site have own domain (this was tricky), each page in the netowkr contain couple of thousands posts nad pages, LVK alone is over 8k, user based/ access levels etc. And due to move to JSON based api it is really crazy fast for that amount of content. There could be more optimization in code, I know, but the time. (I have couple of more pages, also just PHP + VUE, that are great in term of speed)
My point is, JSON based endpoints are really great, and hooks that allow e.g filter out some of content based on user levels/capabilities are handy. At this point I’m not specialist in PHP nor MYSQL so my queries and code there is not super great, and could be improved in many ways. So if there is some one who already made such great plugin, and maybe could improve it event more would be soooo great!
Just note. I’m using JSON files, but those are readed by custom PHP file that use base WP elements if needed (I’m loading WP files on demand if I need some functions like resolve user) then this PHP file does all filtering, etc based on those JSON files.
REALLY LOOKING FOR IT! <3
-
This reply was modified 2 years, 11 months ago by Isu.