igdb-wrapper-java

Wrapper for IGDB REST-API

Лицензия

Лицензия

Категории

Категории

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

Группа

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

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

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

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

v1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

igdb-wrapper-java
Wrapper for IGDB REST-API
Ссылка на сайт

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

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

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

https://github.com/BlackRose01/igdb-wrapper-java/tree/master

Скачать igdb-wrapper-java

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-web jar 2.3.2.RELEASE
com.google.code.gson : gson jar 2.8.6

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

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

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

IGDB Wrapper for Java

This wrapper should help you to send easily requests to the IGDB API.

Structure

Main package:

  • Wrapper class: send requests to API endpoints
  • Parameter class: manage possible parameters which will be accepted by API
  • Postfixes enum: hold relational operators for filter method in Parameters class
  • Version enum: hold versions of api

Endpoint package:

  • Endpoint interface to generalize different endpoint enumerations
  • EndpointPublic enum for public endpoints
  • EndpointPrivate enum for private

Model package:

  • all available models for endpoint

Example

Create an instance of the IgdbWrapper with API-Key, API-Url and create a Parameter object with your filter information. Finally, send the request to the API and save the response on the suitable model class.

// create instance of Wrapper
IgdbWrapper wrapper = new IgdbWrapper("<YOUR-API-KEY>", "<YOUR-API-URL>", Version.Standard);

// show all fields from games
// show full platform object list in games
// show full platform logo object in platform object
Parameters p = new Parameters()
        .addFields("*,platforms.*,platforms.platform_logo.*");

// send request to api and receive object
Game[] g = wrapper.sendRequest(EndpointPublic.Game, p, HttpMethod.POST, Game[].class);

// beautify JSON response
JsonParser parser = new JsonParser();
JsonObject json = parser.parse(g[0].toString()).getAsJsonObject();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = gson.toJson(json);
System.out.println(prettyJson);

License

The scripts and documentation in this project are released under the MIT License

Sources

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

Версия
v1.1
v1.0
v0.12-alpha