Closed serveit-ca closed 5 years ago
Lets create a namespace of "curastream/v2" rather than v1 as the v1 is the old developers and we want to keep it separate.
here is also some great endpoint documentation https://v2.wp-api.org/extending/adding/
Here are the Endpoints we would like to create at this time
Endpoints Have been pushed onto the apiEndpoints branch, probably best we leave this branch open for making future endpoints? @serveit-ca
Hi @SideonDeaka we want to create database endpoints for a variety of our functions.
Please create this on a new branch.
Here is the trail head for the end points in Wordpress https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
There is also a few testing functions which make our lives easier
http://curastream.test/wp-json will show you the json endpoints we have.
Remote Post Function https://codex.wordpress.org/Function_Reference/wp_remote_post Remote Get Function https://codex.wordpress.org/Function_Reference/wp_remote_get Remote Retrieve Body https://codex.wordpress.org/Function_Reference/wp_remote_retrieve_body Remote Retrieve Header https://codex.wordpress.org/Function_Reference/wp_remote_retrieve_header Remote Retrieve Response Code https://codex.wordpress.org/Function_Reference/wp_remote_retrieve_response_code
We will want to create function references for both getting all of the objects or getting a specific object. To get a specific object you can pass the id or name through the API Query URL