tmdb-java

tmdb-java is a Java library that provides access to the themoviedatabase API v3.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования
Группа

Группа

com.uwetrottmann
Идентификатор

Идентификатор

tmdb-java
Последняя версия

Последняя версия

0.10.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

tmdb-java
tmdb-java is a Java library that provides access to the themoviedatabase API v3.
Ссылка на сайт

Ссылка на сайт

https://github.com/UweTrottmann/tmdb-java
Система контроля версий

Система контроля версий

https://github.com/UweTrottmann/tmdb-java

Скачать tmdb-java

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.uwetrottmann/tmdb-java/ -->
<dependency>
    <groupId>com.uwetrottmann</groupId>
    <artifactId>tmdb-java</artifactId>
    <version>0.10.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.uwetrottmann/tmdb-java/
implementation 'com.uwetrottmann:tmdb-java:0.10.1'
// https://jarcasting.com/artifacts/com.uwetrottmann/tmdb-java/
implementation ("com.uwetrottmann:tmdb-java:0.10.1")
'com.uwetrottmann:tmdb-java:jar:0.10.1'
<dependency org="com.uwetrottmann" name="tmdb-java" rev="0.10.1">
  <artifact name="tmdb-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.uwetrottmann', module='tmdb-java', version='0.10.1')
)
libraryDependencies += "com.uwetrottmann" % "tmdb-java" % "0.10.1"
[com.uwetrottmann/tmdb-java "0.10.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.squareup.retrofit : retrofit jar 1.9.0
com.squareup.okhttp : okhttp Необязательный jar 2.7.5

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.assertj : assertj-core jar 1.7.0

Модули Проекта

Данный проект не имеет модулей.

Pull requests (e.g. support for more API endpoints, bug fixes) are welcome!

tmdb-java

A Java wrapper around the TMDb v3 API using retrofit 2.

Usage

Available on Maven Central

Add the following dependency to your Gradle project:

implementation 'com.uwetrottmann.tmdb2:tmdb-java:2.3.1'

or your Maven project:

<dependency>
    <groupId>com.uwetrottmann.tmdb2</groupId>
    <artifactId>tmdb-java</artifactId>
    <version>2.3.1</version>
</dependency>

Use like any other retrofit2 based service. For example:

// Create an instance of the service you wish to use
// you should re-use these
Tmdb tmdb = new Tmdb(API_KEY);
MoviesService moviesService = tmdb.moviesService();
// Call any of the available endpoints
try {
    Response<Movie> response = moviesService
        .summary(550)
        .execute();
    if (response.isSuccessful()) {
        Movie movie = response.body();
        System.out.println(movie.title + " is awesome!");
    }
} catch (Exception e) {
    // see execute() javadoc 
}

See test cases in src/test/ for more examples and the retrofit website for configuration options.

Android

This library ships Java 8 bytecode. This requires Android Gradle Plugin 3.2.x or newer.

Use Proguard, R8!

It is likely not every method in this library is used, so it is probably useful to strip unused ones with Proguard. Apply the Proguard rules for retrofit.

Due to R8 being very eager in stripping unused fields even if they are set by a constructor, prevent entities from getting optimized. Obviously they also should not be obfuscated.

-keep class com.uwetrottmann.tmdb2.entities.** { *; }
-keep class com.uwetrottmann.tmdb2.enumerations.** { *; }

License

This work by Uwe Trottmann is licensed under the Apache License 2.0.

Contributors and changes are tracked by Git.

Do not just copy, make it better.

Версии библиотеки

Версия
0.10.1
0.10.0
0.9.2
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.1
0.4.0