ccc

Wordpress: Plugin json rest api

Wordpress: Plugin json rest api (versión 1.2.5) Para versiones posteriores es diferentes:

https://es.wordpress.org/plugins/json-rest-api/

Para obtener todos los posts:
http://wwwserver/pruebas/wplsg/wp-json/posts?filter[posts_per_page]=2&filter[order]=DESC

Para obtener los comentarios de cada post:
http://wwwserver/pruebas/wplsg/wp-json/posts/16/comments/


Más información en https://www.emenia.es/wordpress-json-rest-api/

----------------------------------------------------------------------

A partir de la versión 4.7 de Prestashop ya no es necesario ningún plugin (viene por defecto en el propio Prestashop). Algunos ejemplos de cómo obtenerlos:

http://wwwserver/pruebas/wplsg/wp-json/wp/v2/posts/
http://wwwserver/pruebas/wplsg/wp-json/wp/v2/posts/16
http://wwwserver/pruebas/wplsg/wp-json/wp/v2/posts?search=viento
http://wwwserver/pruebas/wplsg/wp-json/wp/v2/posts?orderby=title&order=asc

Más información en: http://v2.wp-api.org/reference/posts/

http://wwwserver/pruebas/wplsg/wp-json/wp/v2/comments/?post=16&per_page=1
http://wwwserver/pruebas/wplsg/wp-json/wp/v2/comments/?post=16&search=siempre
http://wwwserver/pruebas/wplsg/wp-json/wp/v2/comments/?search=Dios

Más información en: http://v2.wp-api.org/reference/comments/

 

No hay comentarios:

Publicar un comentario