Class ShlinkRequest

java.lang.Object
org.gcube.application.shlink.ShlinkRequest

public class ShlinkRequest extends Object
Builder class for creating ShlinkShortener requests with fluent interface. This class represents a request to create a short URL using the Shlink API service. It automatically extracts tags from the URL and combines them with additional tags if provided.

Usage example:

 ShlinkRequest request = new ShlinkRequest.Builder()
     .shlinkBaseUrl("https://shlink.example.com")
     .shlinkAPIKey("your-api-key")
     .longUrl("https://example.com/very/long/url")
     .domain("short.example.com")
     .additionalTags(new String[]{"tag1", "tag2"})
     .findIfExists(true)
     .build();
 
Author:
Francesco Mangiacrapa
See Also:
  • Constructor Details

    • ShlinkRequest

      public ShlinkRequest()
  • Method Details

    • getShlinkBaseUrl

      public String getShlinkBaseUrl()
    • getShlinkAPIKey

      public String getShlinkAPIKey()
    • getLongUrl

      public String getLongUrl()
    • getDomain

      public String getDomain()
    • getAdditionalTags

      public String[] getAdditionalTags()
    • isFindIfExists

      public boolean isFindIfExists()