minified-modrinth/com.dervarex.minified.modrinth.internal
AbstractModrinthClient
public abstract class AbstractModrinthClientShared HTTP/JSON helper for Modrinth endpoint clients.
- Known subclasses
- ProjectsClient, TagsClient, TeamsClient, UsersClient, VersionsClient
Fields
protected final Modrinth modrinthConstructors
protected AbstractModrinthClient(Modrinth modrinth)| Parameters | ||
|---|---|---|
modrinth | Modrinth | |
Methods
String buildUrl(String, Map)String encode(String)JsonArray getArray(String)JsonArray getArray(String, Map)List<T> getList(String, Map, Function)JsonObject getObject(String)JsonObject getObject(String, Map)String getRaw(String, Map)JsonObject postObject(String, String)Map<String, String> query(Object[])JsonArray readJsonArray(String)JsonObject readJsonObject(String)String request(String, Map)buildUrl(String, Map)
protectedSource
protected String buildUrl(String path, Map<String, String> query)protected static String encode(String value)getArray(String)
protectedSource
protected JsonArray getArray(String path)getArray(String, Map)
protectedSource
protected JsonArray getArray(String path, Map<String, String> query)getList(String, Map, Function)
protectedSource
protected <T> List<T> getList(
String path,
Map<String, String> query,
Function<JsonObject, T> parser
)getObject(String)
protectedSource
protected JsonObject getObject(String path)| Parameters | ||
|---|---|---|
path | String | |
| Returns | ||
JsonObject | ||
getObject(String, Map)
protectedSource
protected JsonObject getObject(String path, Map<String, String> query)| Parameters | ||
|---|---|---|
path | String | |
query | Map<String, String> | |
| Returns | ||
JsonObject | ||
getRaw(String, Map)
protectedSource
protected String getRaw(String path, Map<String, String> query)postObject(String, String)
protectedSource
protected JsonObject postObject(String path, String jsonBody)| Parameters | ||
|---|---|---|
path | String | |
jsonBody | String | |
| Returns | ||
JsonObject | ||
query(Object[])
protectedSource
protected Map<String, String> query(Object... entries)readJsonArray(String)
protectedSource
protected JsonArray readJsonArray(String json)readJsonObject(String)
protectedSource
protected JsonObject readJsonObject(String json)| Parameters | ||
|---|---|---|
json | String | |
| Returns | ||
JsonObject | ||
request(String, Map)
protectedSource
protected String request(String path, Map<String, String> query)