public class OreAPI
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
SessionController |
controller |
static java.net.URL |
DEFAULT_URL |
com.google.gson.Gson |
gson |
java.net.URL |
urlBase |
static java.lang.String |
USER_AGENT |
| Constructor and Description |
|---|
OreAPI() |
OreAPI(java.net.URL urlBase,
java.lang.String apiKey) |
OreAPI(java.net.URL urlBase,
java.lang.String apiKey,
com.google.gson.Gson gson) |
| Modifier and Type | Method and Description |
|---|---|
static void |
configureConnection(java.net.URLConnection co) |
void |
configureSession(java.net.URLConnection co) |
java.net.URL |
getUncheckedURL(java.lang.String path) |
java.net.URL |
getURL(java.lang.String path) |
java.net.HttpURLConnection |
openConnection(java.lang.String path) |
static java.time.Instant |
parseInstant(java.lang.String value) |
static java.time.temporal.TemporalAccessor |
parseOffsetDateTime(java.lang.String value) |
public static final java.net.URL DEFAULT_URL
public static final java.lang.String USER_AGENT
public final java.net.URL urlBase
public final SessionController controller
public final com.google.gson.Gson gson
public OreAPI()
public OreAPI(java.net.URL urlBase,
java.lang.String apiKey)
public OreAPI(java.net.URL urlBase,
java.lang.String apiKey,
com.google.gson.Gson gson)
public java.net.URL getUncheckedURL(java.lang.String path)
public java.net.URL getURL(java.lang.String path)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic java.net.HttpURLConnection openConnection(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic void configureSession(java.net.URLConnection co)
throws java.io.IOException
java.io.IOExceptionpublic static void configureConnection(java.net.URLConnection co)
public static java.time.Instant parseInstant(java.lang.String value)
public static java.time.temporal.TemporalAccessor parseOffsetDateTime(java.lang.String value)