Java Client for the LH Public API

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

org.hisrc.lhapi
Идентификатор

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

lhapi-client
Последняя версия

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Java Client for the LH Public API
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Скачать lhapi-client

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

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

Зависимости

compile (12)

Идентификатор библиотеки Тип Версия
org.apache.commons : commons-lang3 jar 3.2.1
io.swagger : swagger-annotations jar 1.5.4
com.sun.jersey : jersey-client jar 1.18
com.sun.jersey.contribs : jersey-multipart jar 1.18
com.fasterxml.jackson.core : jackson-core jar 2.4.2
com.fasterxml.jackson.core : jackson-annotations jar 2.4.2
com.fasterxml.jackson.jaxrs : jackson-jaxrs-json-provider jar 2.4.2
com.fasterxml.jackson.core : jackson-databind jar 2.4.2
com.fasterxml.jackson.datatype : jackson-datatype-jsr310 jar 2.4.2
com.fasterxml.jackson.datatype : jackson-datatype-joda jar 2.4.2
com.brsanthu : migbase64 jar 2.2
joda-time : joda-time jar 2.3

test (1)

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

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

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

LH Public API Java Client

This projects provides a Java Client for LH Public API.

This client is based of the Swagger/OpenAPI specifications for the LH Public API from the lhapi-specification project.

Usage

Adding the client to your project

Maven

Add the following dependency to your project:

<dependency>
	<groupId>org.hisrc.lhapi</groupId>
	<artifactId>lhapi-client</artifactId>
	<version>...</version>
</dependency>

Using the client in your Java code

Creating the client

LhApiClient client = new AuthenticatingLhApiClient(clientId, clientSecret);

Getting the flight status

Flight status of LO379 (today):

FlightStatusResponse departuresStatus = client.flightStatus("LO379", LocalDate.now());

Getting departures

Departures from DME +/- one hour from now:

FlightsStatusResponse departuresStatus = client.departuresStatus(
	"DME",
	LocalDateTime.now().minusHours(1),
	LocalDateTime.now().plusHours(1));

Getting arrivals

Arrivals to FRA +/- one hour from now:

FlightsStatusResponse arrivalsStatus = client.arrivalsStatus(
	"FRA",
	LocalDateTime.now().minusHours(1),
	LocalDateTime.now().plusHours(1));

License

Please note that this code is currently under the GPL-3.0 license. We plan to switch to MIT or BSD or dual licensing in the future.

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

Версия
1.0.1