Package net.ygbstudio.jbrave.core.domain
Interface SearchVertical
- All Superinterfaces:
BraveAPIConstant
- All Known Implementing Classes:
BraveResource
An interface representing a search vertical.
This interface extends BraveAPIConstant and is implemented by enums that represent
search verticals.
Each search vertical has a BraveAPIConstant.value() method that is used to get the parameter value for
the API requests. All verticals are followed by the SEARCH_PATH string, and it is
included here for convenience and readability as it is used in the implementation of the
BraveAPIConstant.urlParam() method by default.
- See Also:
-
Field Summary
FieldsFields inherited from interface net.ygbstudio.jbrave.core.domain.BraveAPIConstant
SEARCH_API_BASE -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic @NotNull StringurlVertical(@NotNull SearchVertical vertical) Creates a URL query string for the given search vertical.Methods inherited from interface net.ygbstudio.jbrave.core.domain.BraveAPIConstant
urlParam, value
-
Field Details
-
SEARCH_PATH
- See Also:
-
-
Method Details
-
urlVertical
@Contract(pure=true) @NotNull static @NotNull String urlVertical(@NotNull @NotNull SearchVertical vertical) Creates a URL query string for the given search vertical.This method takes a search vertical and returns a URL query string that can be used to construct a request to the Brave API. The URL query string is constructed by concatenating the value of the search vertical with the
SEARCH_PATHstring and appending"?q=".- Parameters:
vertical- the search vertical to use for constructing the URL query string- Returns:
- the URL query string for the given search vertical
-