Interface PostsSPI


  • @Path("/wp")
    public interface PostsSPI
    Describes the Wordpress Posts API.
    Since:
    0.0.1
    See Also:
    Posts API Reference
    • Method Detail

      • list

        @GET
        @Path("/v{apiVersion}/posts")
        @Produces("application/json")
        List<Post> list​(@PathParam("apiVersion")
                        String apiVersion,
                        @QueryParam("context")
                        Context context,
                        @QueryParam("page")
                        Integer page,
                        @QueryParam("per_page")
                        Integer perPage,
                        @QueryParam("search")
                        String search,
                        @QueryParam("after")
                        Date after,
                        @QueryParam("author")
                        List<Integer> author,
                        @QueryParam("author_exclude")
                        List<Integer> authorExclude,
                        @QueryParam("before")
                        Date before,
                        @QueryParam("exclude")
                        List<Integer> exclude,
                        @QueryParam("include")
                        List<Integer> include,
                        @QueryParam("offset")
                        List<Integer> offset,
                        @QueryParam("order")
                        Order order,
                        @QueryParam("orderby")
                        PostOrderBy orderBy,
                        @QueryParam("slug")
                        List<String> slug,
                        @QueryParam("status")
                        PublishableStatus status,
                        @QueryParam("categories")
                        List<String> categories,
                        @QueryParam("categories_exclude")
                        List<String> categoriesExclude,
                        @QueryParam("tags")
                        List<String> tags,
                        @QueryParam("tags_exclude")
                        List<String> tagsExclude,
                        @QueryParam("stick")
                        Boolean stick)
      • retrieve

        @GET
        @Path("/v{apiVersion}/posts/{postId}")
        @Produces("application/json")
        Post retrieve​(@PathParam("apiVersion")
                      String apiVersion,
                      @PathParam("postId")
                      int postId,
                      @QueryParam("context")
                      Context context,
                      @QueryParam("password")
                      String password)
      • create

        @POST
        @Path("/v{apiVersion}/posts")
        @Produces("application/json")
        @Consumes("application/json")
        Post create​(@PathParam("apiVersion")
                    String apiVersion,
                    Post post)
      • update

        @POST
        @Path("/v{apiVersion}/posts/{postId}")
        @Produces("application/json")
        @Consumes("application/json")
        Post update​(@PathParam("apiVersion")
                    String apiVersion,
                    @PathParam("postId")
                    int postId,
                    Post post)
      • delete

        @DELETE
        @Path("/v{apiVersion}/posts/{postId}")
        Post delete​(@PathParam("apiVersion")
                    String apiVersion,
                    @PathParam("postId")
                    int postId)
      • forceDelete

        @DELETE
        @Path("/v{apiVersion}/posts/{postId}?force=true")
        DeletedModel<Post> forceDelete​(@PathParam("apiVersion")
                                       String apiVersion,
                                       @PathParam("postId")
                                       int postId)