Interface PostStatusAPIs

All Known Implementing Classes:
PostStatusApiClientModule

public interface PostStatusAPIs
Defines operations for retrieving WordPress post statuses through the WordPress REST API.

This interface provides methods for retrieving individual post status definitions as well as the complete collection of registered post statuses available on a WordPress site.

Post statuses describe the publication state and visibility of content resources, including statuses such as publish, draft, pending, future, and private.

Implementations are expected to communicate with the /wp-json/wp/v2/statuses endpoint or compatible APIs.

  • Method Summary

    Modifier and Type
    Method
    Description
    get(String name)
    Retrieves a post status definition by its unique slug.
    Retrieves all registered post statuses.
  • Method Details

    • get

      WpStatus get(String name)
      Retrieves a post status definition by its unique slug.

      Examples include publish, draft, pending, future, and private.

      Parameters:
      name - the status slug; must not be null
      Returns:
      the matching WpStatus
    • list

      Retrieves all registered post statuses.

      The returned map is keyed by status slug and contains the corresponding WpStatus definitions.

      Returns:
      a map of status slugs to status definitions