serveit-ca / curastreamPlugin

Curastream
https://www.curastream.com
0 stars 0 forks source link

Create API Endpoints #72

Closed serveit-ca closed 5 years ago

serveit-ca commented 5 years ago

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

serveit-ca commented 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.

serveit-ca commented 5 years ago

here is also some great endpoint documentation https://v2.wp-api.org/extending/adding/

serveit-ca commented 5 years ago

Here are the Endpoints we would like to create at this time

serveit-ca commented 5 years ago

EndPoint Development - Create Custom Endpoints

SideonDeaka commented 5 years ago

Endpoints Have been pushed onto the apiEndpoints branch, probably best we leave this branch open for making future endpoints? @serveit-ca

SideonDeaka commented 5 years ago

60 and #74 are endpoints still needed created, will work under those respective issues and branches for that.