public class MclogsAPI
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
mcversion |
static java.lang.String |
userAgent |
static java.lang.String |
version |
| Constructor and Description |
|---|
MclogsAPI() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
get(java.lang.String id)
get the raw log contents
|
static java.lang.String |
getApiHost() |
static java.lang.String |
getProtocol() |
static java.lang.String[] |
listCrashReports(java.lang.String directory)
list crash reports in a directory
|
static java.lang.String[] |
listLogs(java.lang.String directory)
list logs in a directory
|
static void |
setApiHost(java.lang.String apiHost) |
static void |
setProtocol(java.lang.String protocol) |
static APIResponse |
share(Log log)
share a log to the mclogs API
|
static APIResponse |
share(java.nio.file.Path logFile)
share a log to the mclogs API
|
static APIResponse |
share(java.lang.String dir,
java.lang.String file)
Deprecated.
Use
share(Log) or share(Path) instead |
public static java.lang.String mcversion
public static java.lang.String userAgent
public static java.lang.String version
public static APIResponse share(Log log) throws java.io.IOException
log - The Log to shareAPIResponsejava.io.IOException - error sharing the log contentpublic static APIResponse share(java.nio.file.Path logFile) throws java.io.IOException
logFile - The log file, which must have a file extension of '.log'. The file extension may be suffixed by both `.0` and `.gz`APIResponsejava.io.IOException - error reading/sharing file@Deprecated public static APIResponse share(java.lang.String dir, java.lang.String file) throws java.io.IOException
share(Log) or share(Path) insteaddir - The parent directory of the log filefile - The log file, which must have a file extension of '.log'. The file extension may be suffixed by both `.0` and `.gz`APIResponsejava.io.IOException - error reading/sharing filepublic static java.lang.String get(java.lang.String id)
throws java.io.IOException
id - log idjava.io.IOException - connection errorpublic static java.lang.String[] listLogs(java.lang.String directory)
directory - server/client directorypublic static java.lang.String[] listCrashReports(java.lang.String directory)
directory - server/client directorypublic static java.lang.String getApiHost()
public static void setApiHost(java.lang.String apiHost)
apiHost - api host urlpublic static java.lang.String getProtocol()
public static void setProtocol(java.lang.String protocol)
protocol - protocol