Class PostRevisionApiClientModule
java.lang.Object
io.github.evisentin.wordpress.client.adapter.apache.modules.PostRevisionApiClientModule
- All Implemented Interfaces:
PostRevisionAPIs
-
Constructor Summary
ConstructorsConstructorDescriptionPostRevisionApiClientModule(String apiUrl, org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionget(long postId, long revisionId) Retrieves a specific post revision by its unique identifier.list(long postId, @NonNull WpPagingQuery pageQuery, WpPostRevisionQuery postQuery) Retrieves a paginated list of revisions for a post.
-
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
Description copied from interface:PostRevisionAPIsRetrieves a specific post revision by its unique identifier.Retrieves a single revision record belonging to the specified parent post.
- Specified by:
getin interfacePostRevisionAPIs- Parameters:
postId- the ID of the parent postrevisionId- 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:PostRevisionAPIsRetrieves a paginated list of revisions for a post.The result set can be controlled and filtered using pagination and revision query parameters.
- Specified by:
listin interfacePostRevisionAPIs- 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
-