Class SearchAPI
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.QueryResource
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.impl.SearchAPI
-
public final class SearchAPI extends QueryResource
Implementation of a connector for the remote API's Search endpoint.
Provides static access to all routes of this endpoint which may be used to search for a particular series.
-
-
Field Summary
-
Fields inherited from class com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
ID_VALIDATOR, PATH_ID
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.JsonNode
getAvailableSearchParameters(APIConnection con)
Returns possible query parameters, which can be used to search for series, as raw JSON.static com.fasterxml.jackson.databind.JsonNode
series(APIConnection con, QueryParameters params)
Returns series search results based on the given query parameters as raw JSON.-
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.QueryResource
createQueryResource
-
Methods inherited from class com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
createResource, createResource
-
-
-
-
Method Detail
-
series
public static com.fasterxml.jackson.databind.JsonNode series(@Nonnull APIConnection con, QueryParameters params) throws APIException
Returns series search results based on the given query parameters as raw JSON. The result contains basic information of all series matching the query parameters.
Corresponds to remote API route: [GET] /search/series- Parameters:
con
- Initialized connection to be used for API communicationparams
- Object containing key/value pairs of query search parameters. For a complete list of possible search parameters see the API documentation or usegetAvailableSearchParameters(con)
.- Returns:
- JSON object containing the series search results
- Throws:
APIException
- If an exception with the remote API occurs, e.g. authentication failure, IO error, resource not found, etc. or if no records are found that match your query.
-
getAvailableSearchParameters
public static com.fasterxml.jackson.databind.JsonNode getAvailableSearchParameters(@Nonnull APIConnection con) throws APIException
Returns possible query parameters, which can be used to search for series, as raw JSON.
Corresponds to remote API route: [GET] /search/series/params- Parameters:
con
- Initialized connection to be used for API communication- Returns:
- JSON object containing possible parameters to query by in the series search route
- Throws:
APIException
- If an exception with the remote API occurs, e.g. authentication failure, IO error, resource not found, etc.
-
-