Class PastebinUtil

java.lang.Object
dev.cwhead.GravesX.util.PastebinUtil

public final class PastebinUtil extends Object
Minimal Pastebin API client for posting text dumps. Returns the paste URL on success, or null on failure.
  • Method Details

    • post

      public static String post(String devKey, String userKey, String title, String content, String privacy, String expire)
      Post text content to Pastebin.
      Parameters:
      devKey - Pastebin API dev key (required)
      userKey - Pastebin user key (optional; required for PRIVATE pastes)
      title - Paste title
      content - Paste body (text)
      privacy - "PUBLIC" | "UNLISTED" | "PRIVATE" (case-insensitive)
      expire - "N" | "10M" | "1H" | "1D" | "1W" | "2W" | "1M" | "6M" | "1Y"
      Returns:
      The paste URL on success; null on error.