Add the following dependency to your project:
// Gradle
implementation 'io.v47.tmdb-api-client:standalone:5.0.0'
// Gradle Kotlin DSL
implementation("io.v47.tmdb-api-client:standalone:5.0.0")
<!--Maven-->
<dependencies>
<dependency>
<groupId>io.v47.tmdb-api-client</groupId>
<artifactId>standalone</artifactId>
<version>5.0.0</version>
</dependency>
</dependencies>
This will include the api
, core
, standalone
, and http-client-java11
packages in your
project, so you can get started immediately using the default HTTP client (framework agnostic).
You can create a standalone TMDb client like this:
// Kotlin
const val API_KEY = "..."
val tmdbClient = StandaloneTmdbClient(API_KEY)
class MyClass {
private static final String API_KEY = "...";
TmdbClient tmdbClient = StandaloneTmdbClient.WithApiKey(API_KEY);
}
If you don't want to use the standalone
module, just add the api
module and the http-client-*
module of your choice to your project.
This library provides access to the entire read-only API (v3) of TheMovieDb, authenticated using an API-Key, including images.
Various integrations with application frameworks are also available:
Adding support for more frameworks is fairly trivial, only a small adapter needs to be implemented for the actual HTTP client. To make development easier a TCK is provided to verify compatibility of the HTTP client adapter with the actual TMDb client.
Even though this library is implemented using Kotlin it remains fully compatible with Java and exposes a Java-friendly reactive API.
Automatically generated Kotlin docs are available here.
Requirements:
- JDK 17
- Docker (for Quarkus extension integration-tests)
For local building and testing you need to configure a TMDb API-Key using
the environment variable API_KEY
.
Then you can simply run a complete build of all packages using this command:
./gradlew build
To also run the Quarkus integration tests in native mode use this command:
./gradlew build -Dquarkus.package.jar.enabled=false -Dquarkus.native.enabled=true -Dquarkus.native.container-build=true