Enum Class WPRestPath
- All Implemented Interfaces:
Serializable,Comparable<WPRestPath>,Constable,FriendlyEnum,RestPathEnum
Enum representing various API endpoints and query parameters for WordPress REST API.
This enum includes common endpoints and parameters used to interact with WordPress data, such as users, posts, categories, media, and tags.
- Since:
- 0.1.0
- Author:
- Yoham Gabriel @ YGBStudio
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionREST endpoint for interacting with categories.REST endpoint for content uploads, dynamically based on the current year and month.REST endpoint for interacting with media.REST endpoint for interacting with photos.REST endpoint for interacting with posts.REST endpoint for interacting with tags.REST endpoint for interacting with users. -
Method Summary
Modifier and TypeMethodDescriptionvalue()Returns the value of the enum constant, which is the actual string to be used in the API.static WPRestPathReturns the enum constant of this class with the specified name.static WPRestPath[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
USERS
REST endpoint for interacting with users. -
POSTS
REST endpoint for interacting with posts. -
PHOTOS
REST endpoint for interacting with photos. -
CATEGORIES
REST endpoint for interacting with categories. -
MEDIA
REST endpoint for interacting with media. -
TAGS
REST endpoint for interacting with tags. -
CONTENT_UPLOADS
REST endpoint for content uploads, dynamically based on the current year and month.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
value
Description copied from interface:FriendlyEnumReturns the value of the enum constant, which is the actual string to be used in the API.Example: If an enum constant is named
STATUS_PENDING, the value returned by this method would be"pending", which is the value provided in its constructor.- Specified by:
valuein interfaceFriendlyEnum- Returns:
- the value of the enum constant
-