public abstract class Dota2WebApiInterface extends AbstractWebApiInterface<SteamWebApiClient,Dota2WebApiRequest,Dota2WebApiResponse>
Abstract Dota2WebApiInterface class.
VERSION_1, VERSION_2, VERSION_3| Constructor and Description |
|---|
Dota2WebApiInterface(SteamWebApiClient client)
Constructor for Dota2WebApiInterface.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> List<T> |
asCollectionOf(Class type,
String listName,
com.google.gson.JsonObject root)
asCollectionOf.
|
protected <T> List<T> |
asListOf(Class type,
String listName,
com.google.gson.JsonObject root,
boolean strict)
Similar to
AbstractWebApiInterface.asCollectionOf(Class, String, JsonObject, Class, boolean) minus the Collection class argument. |
protected com.google.gson.JsonObject |
getValidResult(com.google.gson.JsonObject json)
getValidResult.
|
asCollectionOf, builder, configureBuilder, fromJson, fromJson, handleError, sendRequestpublic Dota2WebApiInterface(SteamWebApiClient client)
Constructor for Dota2WebApiInterface.
client - a SteamWebApiClient objectprotected <T> List<T> asCollectionOf(Class type, String listName, com.google.gson.JsonObject root)
asCollectionOf.
protected <T> List<T> asListOf(Class type, String listName, com.google.gson.JsonObject root, boolean strict)
Similar to AbstractWebApiInterface.asCollectionOf(Class, String, JsonObject, Class, boolean) minus the Collection class argument. This also returns a List collection type instead.
asListOf in class AbstractWebApiInterface<SteamWebApiClient,Dota2WebApiRequest,Dota2WebApiResponse>T - The type of the List to be returnedtype - The Class type of the item in the CollectionlistName - The name of the JsonArray element that we will convertroot - The JsonObject that will be used to search for the JsonArray elementstrict - If true an exception will be thrown if the listName is not found within the search element specified.
Otherwise no exceptions will be raised and an empty Collection instance will be returned.List containing the parsed json entitiesprotected com.google.gson.JsonObject getValidResult(com.google.gson.JsonObject json)
getValidResult.
json - a JsonObject objectJsonObject objectCopyright © 2016–2024. All rights reserved.