Class UpdatesAPI
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.QueryResource
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.impl.UpdatesAPI
-
public final class UpdatesAPI extends QueryResource
Implementation of a connector for the remote API's Updates endpoint.
Provides static access to all routes of this endpoint which may be used to fetch series that have been recently updated.
-
-
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.JsonNodegetQueryParams(APIConnection con)Returns a list of valid parameters for querying series which have been updated lately, as raw JSON.static com.fasterxml.jackson.databind.JsonNodequery(APIConnection con, QueryParameters params)Returns an array of series that have changed in a maximum of one week blocks since the providedfromTimequery parameter, 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
-
query
public static com.fasterxml.jackson.databind.JsonNode query(@Nonnull APIConnection con, @CheckForNull QueryParameters params) throws APIException
Returns an array of series that have changed in a maximum of one week blocks since the providedfromTimequery parameter, as raw JSON. Note that the given query parameters must always contain a validfromTimeEpoch timestamp key.
The user may specify an additionaltoTimequery key to grab results for less than a week. Any timespan larger than a week will be reduced down to one week automatically.
Corresponds to remote API route: [GET] /updated/query- Parameters:
con- Initialized connection to be used for API communicationparams- Object containing key/value pairs of query parameters. For a complete list of possible query parameters see the API documentation or usegetQueryParams(con).- Returns:
- JSON object containing a list of updated objects that match the given timeframe
- Throws:
APIException- If an exception with the remote API occurs, e.g. authentication failure, IO error, resource not found, etc. or no records exist for the given timespan.
-
getQueryParams
public static com.fasterxml.jackson.databind.JsonNode getQueryParams(@Nonnull APIConnection con) throws APIException
Returns a list of valid parameters for querying series which have been updated lately, as raw JSON. These keys are permitted to be used inQueryParametersobjects when querying for recently updated series.
Corresponds to remote API route: [GET] /updated/query/params- Parameters:
con- Initialized connection to be used for API communication- Returns:
- JSON object containing a list of possible parameters which may be used to query for last updated series
- Throws:
APIException- If an exception with the remote API occurs, e.g. authentication failure, IO error, resource not found, etc.
-
-