Class PasteeClient

java.lang.Object
net.tnemc.plugincore.core.paste.impl.PasteeClient
All Implemented Interfaces:
IPasteClient

public class PasteeClient extends Object implements IPasteClient
PasteeClient
Since:
1.0.0.2
Author:
creatorfromhell
  • Constructor Details

  • Method Details

    • identifier

      public String identifier()
      Description copied from interface: IPasteClient
      Retrieves the identifier associated with this object.
      Specified by:
      identifier in interface IPasteClient
      Returns:
      The identifier as a String.
    • endpoint

      public String endpoint()
      Description copied from interface: IPasteClient
      Retrieves the endpoint associated with this client.
      Specified by:
      endpoint in interface IPasteClient
      Returns:
      The endpoint as a String.
    • apiKey

      public String apiKey()
      Description copied from interface: IPasteClient
      Provides the API key associated with this client.
      Specified by:
      apiKey in interface IPasteClient
      Returns:
      The API key as a String.
    • createSingle

      public Optional<String> createSingle(IPasteable pasteable)
      Description copied from interface: IPasteClient
      Creates a single paste based on the provided IPasteable object.
      Specified by:
      createSingle in interface IPasteClient
      Parameters:
      pasteable - the IPasteable object containing the details of the paste to create
      Returns:
      an Optional of String representing the URL of the created paste, or an empty Optional if creation fails
    • createMultiple

      public Optional<String> createMultiple(IPasteable... pasteables)
      Description copied from interface: IPasteClient
      Creates multiple pastes based on the provided IPasteable objects.
      Specified by:
      createMultiple in interface IPasteClient
      Parameters:
      pasteables - an array of IPasteable objects containing the details of the pastes to create
      Returns:
      an Optional of String representing the URL of the last created paste, or an empty Optional if creation fails or no pastes were created