Class QueryResource
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.QueryResource
-
- Direct Known Subclasses:
MoviesAPI
,SearchAPI
,SeriesAPI
,UpdatesAPI
,UsersAPI
public abstract class QueryResource extends Resource
Specialized implementation for resources containing additional URL query parameters.
Provides general functionality for the creation of query resource strings. Only non-empty parameters will be considered. Parameter values will be encoded automatically.
-
-
Field Summary
-
Fields inherited from class com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
ID_VALIDATOR, PATH_ID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
QueryResource()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static String
createQueryResource(String base, String specific, QueryParameters queryParams)
Creates a new query resource string consisting of the givenbase
andspecific
URL path parameters prepended by the given query parameters in the following format:/BASE/specific?query1=value1&query2=value2&...
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
createResource, createResource
-
-
-
-
Method Detail
-
createQueryResource
protected static String createQueryResource(@Nonnull String base, @CheckForNull String specific, @CheckForNull QueryParameters queryParams)
Creates a new query resource string consisting of the givenbase
andspecific
URL path parameters prepended by the given query parameters in the following format:/BASE/specific?query1=value1&query2=value2&...
- Parameters:
base
- Base URL path parameter which identifies a particular endpointspecific
- Specific URL path parameter representing the actual route to be invokedqueryParams
- Set of query parameters to be added to the very end of the resource String- Returns:
- Composed query resource String based on the given parameters
-
-