Package dev.cwhead.GravesX.util
Class PastebinUtil
java.lang.Object
dev.cwhead.GravesX.util.PastebinUtil
Minimal Pastebin API client for posting text dumps.
Returns the paste URL on success, or
null
on failure.-
Method Summary
-
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 titlecontent
- 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.
-