-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for WP-API /wp-json endpoints. #11
Conversation
small question by the way:
So the parameter into the url always will be a domain and It never will be a site id? |
Can we add a simple example here ? Do we have already defined some endpoint working for that? |
Anyway LGTM |
Add support for WP-API /wp-json endpoints.
@retrofox my plan is to try and build out an endpoint in wpcom.js to utilize this - so that could serve as an example. There still is a bit of chatter/discussion around the path - so it could change still - though so many things are already in motion it might not change.
I'm fairly certain slug/ID will be interchangeable here - but will verify |
👍 What do you think to apply these changes in |
So far the path logic for apiVersioning for the proxy is done in the rest-proxy js itself - there is a diff on wpcom going for that change currently. |
oh cool. Thanks! El jue., 11 feb. 2016 a las 19:41, Timmy Crawford (notifications@github.com)
|
oh, nice. Thanks! |
This PR is part of the project to integrate the WP-API with the WordPress.com API. WP-API endpoints will utilize the following endpoint structure on WordPress.com:
/wp-json/{ site }/{ namespace }/{ version }/{ endpoint }
For example a "core" endpoint for post types would be:
/wp-json/{ site }/wp/v2/types
There has been some discussion about this URL structure ( and some of its oddities ) already, and here is a quick synopsis that @nylen provided:
With the version being further down the path, the other libraries like wpcom.js will need to be aware of how to properly build the paths depending on API version as well - this PR just adjusts the base path to be ready for WP-API v2 endpoints.
/cc @retrofox