Class PostRevisionApiClientModule

java.lang.Object
io.github.evisentin.wordpress.client.adapter.apache.modules.PostRevisionApiClientModule
All Implemented Interfaces:
PostRevisionAPIs

public class PostRevisionApiClientModule extends Object implements PostRevisionAPIs
  • Constructor Details

    • PostRevisionApiClientModule

      public PostRevisionApiClientModule(String apiUrl, org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper mapper)
  • Method Details

    • get

      public WpPostRevision get(long postId, long revisionId)
      Description copied from interface: PostRevisionAPIs
      Retrieves a specific post revision by its unique identifier.

      Retrieves a single revision record belonging to the specified parent post.

      Specified by:
      get in interface PostRevisionAPIs
      Parameters:
      postId - the ID of the parent post
      revisionId - the unique identifier of the revision to retrieve
      Returns:
      the matching WpPostRevision
    • list

      public WpPagedResponse<WpPostRevision> list(long postId, @NonNull @NonNull WpPagingQuery pageQuery, WpPostRevisionQuery postQuery)
      Description copied from interface: PostRevisionAPIs
      Retrieves a paginated list of revisions for a post.

      The result set can be controlled and filtered using pagination and revision query parameters.

      Specified by:
      list in interface PostRevisionAPIs
      Parameters:
      postId - the ID of the parent post whose revisions should be listed
      pageQuery - the pagination settings, including page number and page size; must not be null
      postQuery - additional revision query parameters; may be null when no extra filtering is needed
      Returns:
      a paginated response containing WpPostRevision items