Class TagsApi

java.lang.Object
software.xdev.mailpit.client.BaseApi
software.xdev.mailpit.api.TagsApi

public class TagsApi extends BaseApi
  • Constructor Details

    • TagsApi

      public TagsApi()
    • TagsApi

      public TagsApi(ApiClient apiClient)
  • Method Details

    • deleteTagParams

      public String deleteTagParams(@Nonnull String tag) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • getAllTags

      public List<String> getAllTags() throws ApiException
      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

      public List<String> getAllTags(Map<String,String> additionalHeaders) throws ApiException
      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 ApiException
      Rename 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

      public String setTagsParams(@Nullable SetTagsParamsRequest body) throws ApiException
      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 ApiException
      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)
      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 ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      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.