Class LanguagesAPI
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.Resource
-
- com.github.m0nk3y2k4.thetvdb.internal.resource.impl.LanguagesAPI
-
-
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
get(APIConnection con, long id)
Returns further language information for a given language ID as raw JSON.static com.fasterxml.jackson.databind.JsonNode
getAllAvailable(APIConnection con)
Returns an overview of all supported languages 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.Resource
createResource, createResource
-
-
-
-
Method Detail
-
getAllAvailable
public static com.fasterxml.jackson.databind.JsonNode getAllAvailable(@Nonnull APIConnection con) throws APIException
Returns an overview of all supported languages as raw JSON. These language abbreviations can be used to set the preferred language for the communication with the remote service.
Corresponds to remote API route: [GET] /languages- Parameters:
con
- Initialized connection to be used for API communication- Returns:
- JSON object containing all languages that are supported by the remote service
- Throws:
APIException
- If an exception with the remote API occurs, e.g. authentication failure, IO error, resource not found, etc.
-
get
public static com.fasterxml.jackson.databind.JsonNode get(@Nonnull APIConnection con, long id) throws APIException
Returns further language information for a given language ID as raw JSON. The language abbreviation can be used to set the preferred language for the communication with the remote service.
Corresponds to remote API route: [GET] /languages/{id}- Parameters:
con
- Initialized connection to be used for API communicationid
- The ID of the language- Returns:
- JSON object containing detailed language information
- Throws:
APIException
- If an exception with the remote API occurs, e.g. authentication failure, IO error, resource not found, etc. or if the given language ID does not exist.
-
-