Class PostStatusApiClientModule
java.lang.Object
io.github.evisentin.wordpress.client.adapter.apache.modules.PostStatusApiClientModule
- All Implemented Interfaces:
PostStatusAPIs
Apache HttpClient implementation of
PostStatusAPIs.
Provides access to WordPress post status definitions through the /wp/v2/statuses endpoint.
-
Constructor Summary
ConstructorsConstructorDescriptionPostStatusApiClientModule(@NonNull String apiUrl, @NonNull org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient, @NonNull com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
-
Constructor Details
-
PostStatusApiClientModule
public PostStatusApiClientModule(@NonNull @NonNull String apiUrl, @NonNull @NonNull org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient, @NonNull @NonNull com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
get
Description copied from interface:PostStatusAPIsRetrieves a post status definition by its unique slug.Examples include
publish,draft,pending,future, andprivate.- Specified by:
getin interfacePostStatusAPIs- Parameters:
name- the status slug; must not benull- Returns:
- the matching
WpStatus
-
list
Description copied from interface:PostStatusAPIsRetrieves all registered post statuses.The returned map is keyed by status slug and contains the corresponding
WpStatusdefinitions.- Specified by:
listin interfacePostStatusAPIs- Returns:
- a map of status slugs to status definitions
-