Interface PostRevisionAPIs
- All Known Implementing Classes:
PostRevisionApiClientModule
public interface PostRevisionAPIs
Defines operations for managing WordPress post revisions through the WordPress REST API.
This interface provides methods for listing and retrieving WpPostRevision resources associated with a
parent post.
Implementations are expected to communicate with the /wp-json/wp/v2/posts/<parent>/revisions endpoint or
compatible APIs.
-
Method Summary
Modifier and TypeMethodDescriptionget(long postId, long revisionId) Retrieves a specific post revision by its unique identifier.list(long postId, WpPagingQuery pageQuery, WpPostRevisionQuery postQuery) Retrieves a paginated list of revisions for a post.
-
Method Details
-
get
Retrieves a specific post revision by its unique identifier.Retrieves a single revision record belonging to the specified parent post.
- Parameters:
postId- the ID of the parent postrevisionId- the unique identifier of the revision to retrieve- Returns:
- the matching
WpPostRevision
-
list
WpPagedResponse<WpPostRevision> list(long postId, WpPagingQuery pageQuery, WpPostRevisionQuery postQuery) Retrieves a paginated list of revisions for a post.The result set can be controlled and filtered using pagination and revision query parameters.
- Parameters:
postId- the ID of the parent post whose revisions should be listedpageQuery- the pagination settings, including page number and page size; must not benullpostQuery- additional revision query parameters; may benullwhen no extra filtering is needed- Returns:
- a paginated response containing
WpPostRevisionitems
-