Package software.xdev.mailpit.api
Class TagsApi
java.lang.Object
software.xdev.mailpit.client.BaseApi
software.xdev.mailpit.api.TagsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteTagParams(String tag) Delete a tag Deletes a tag.deleteTagParams(String tag, Map<String, String> additionalHeaders) Delete a tag Deletes a tag.Get all current tags Returns a JSON array of all unique message tags.getAllTags(Map<String, String> additionalHeaders) Get all current tags Returns a JSON array of all unique message tags.<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.renameTagParams(String tag, RenameTagParamsRequest body) Rename a tag Renames an existing tag.renameTagParams(String tag, RenameTagParamsRequest body, Map<String, String> additionalHeaders) Rename a tag Renames an existing tag.Set message tags This will overwrite any existing tags for selected message database IDs.setTagsParams(SetTagsParamsRequest body, Map<String, String> additionalHeaders) Set message tags This will overwrite any existing tags for selected message database IDs.Methods inherited from class software.xdev.mailpit.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
TagsApi
public TagsApi() -
TagsApi
-
-
Method Details
-
deleteTagParams
Delete a tag Deletes a tag. This will not delete any messages with the tag, but will remove the tag from any messages containing the tag.- Parameters:
tag- The url-encoded tag name to delete (required)- Returns:
- String
- Throws:
ApiException- if fails to make API call
-
deleteTagParams
public String deleteTagParams(@Nonnull String tag, Map<String, String> additionalHeaders) throws ApiExceptionDelete a tag Deletes a tag. This will not delete any messages with the tag, but will remove the tag from any messages containing the tag.- Parameters:
tag- The url-encoded tag name to delete (required)additionalHeaders- additionalHeaders for this call- Returns:
- String
- Throws:
ApiException- if fails to make API call
-
getAllTags
Get all current tags Returns a JSON array of all unique message tags.- Returns:
- List<String>
- Throws:
ApiException- if fails to make API call
-
getAllTags
Get all current tags Returns a JSON array of all unique message tags.- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- List<String>
- Throws:
ApiException- if fails to make API call
-
renameTagParams
public String renameTagParams(@Nonnull String tag, @Nullable RenameTagParamsRequest body) throws ApiException Rename a tag Renames an existing tag.- Parameters:
tag- The url-encoded tag name to rename (required)body- (optional)- Returns:
- String
- Throws:
ApiException- if fails to make API call
-
renameTagParams
public String renameTagParams(@Nonnull String tag, @Nullable RenameTagParamsRequest body, Map<String, String> additionalHeaders) throws ApiExceptionRename a tag Renames an existing tag.- Parameters:
tag- The url-encoded tag name to rename (required)body- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- String
- Throws:
ApiException- if fails to make API call
-
setTagsParams
Set message tags This will overwrite any existing tags for selected message database IDs. To remove all tags from a message, pass an empty tags array.- Parameters:
body- (optional)- Returns:
- String
- Throws:
ApiException- if fails to make API call
-
setTagsParams
public String setTagsParams(@Nullable SetTagsParamsRequest body, Map<String, String> additionalHeaders) throws ApiExceptionSet message tags This will overwrite any existing tags for selected message database IDs. To remove all tags from a message, pass an empty tags array.- Parameters:
body- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- String
- Throws:
ApiException- if fails to make API call
-
invokeAPI
public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- Parameters:
url- The URL for the request, either full URL or only the path.method- The HTTP method for the request.request- The request object.returnType- The return type.additionalHeaders- Additional headers for the request.- Returns:
- The API response in the specified type.
- Throws:
ApiException- if fails to make API call.
-