public class Query
Class that enables the querying of models using the API
Constructor and Description |
---|
Query(ApiConnection apiConnection,
java.lang.String endpoint,
kotlin.jvm.functions.Function1<? super org.json.JSONObject,? extends net.namibsun.hktipp.models.Model> generatorFunc,
java.util.List<java.lang.String> validFilterKeys)
Class that enables the querying of models using the API
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(java.lang.String key,
java.lang.Object value)
Adds a filter to the parameter map
|
java.util.List<net.namibsun.hktipp.models.Model> |
query()
Executes the query
|
public Query(ApiConnection apiConnection, java.lang.String endpoint, kotlin.jvm.functions.Function1<? super org.json.JSONObject,? extends net.namibsun.hktipp.models.Model> generatorFunc, java.util.List<java.lang.String> validFilterKeys)
Class that enables the querying of models using the API
apiConnection
- : The API connection to useendpoint
- : The API endpoint to use for queryinggeneratorFunc
- : A function that generates a model from a JSON objectvalidFilterKeys
- : The filter keys that are enabled for this query objectapiConnection
- : The API connection to useendpoint
- : The API endpoint to use for queryinggeneratorFunc
- : A function that generates a model from a JSON objectvalidFilterKeys
- : The filter keys that are enabled for this query objectpublic void addFilter(java.lang.String key, java.lang.Object value)
Adds a filter to the parameter map
key
- : The filter namevalue
- : The filter valuepublic java.util.List<net.namibsun.hktipp.models.Model> query()
Executes the query