Skip to content

Launch Library (launchlibrary.net) API wrapper for Java

License

Notifications You must be signed in to change notification settings

NahuLD/java-launch-library

Repository files navigation

java-launch-library

Travis-CI Build Status Download

A simple wrapper written in Java for the Launch Library API. Written and maintained by Nahuel.

Requirements

  • Java 8 or above.

Download

Replace VERSION with a specific version. The latest version can be found at the "Download" button, or the Bintray page.

Maven
<repositories>
  <repository>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
    <id>central</id>
    <name>bintray</name>
    <url>https://jcenter.bintray.com</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>me.nahu</groupId>
    <artifactId>launchlibrary</artifactId>
    <version>VERSION</version>
    <type>pom</type>
  </dependency>
</dependencies>
Gradle:
repositories {
    jcenter()
}

dependencies {
    compile 'me.nahu:launchlibrary:VERSION'
}

Usage

To get started, you'll need to get a LaunchLibrary instance.

        LaunchLibrary launchLibrary = new LaunchLibrary.Builder().build();

Next, we can use the functions in this instance to query the API and get what we need. For this next example we'll query all Falcon rockets and print their names.

        LaunchLibrary launchLibrary = new LaunchLibrary.Builder().build();
        launchLibrary.getRocketsFromName("Falcon").execute(rocketQuery -> 
                rocketQuery.getRockets().forEach(rocket -> 
                        System.out.println(rocket.getName())
                )
        );

How to build

With dependencies
  1. Run ./gradlew shadowJar in project's root.
  2. The file located in build/libs.
Without dependencies
  1. Run ./gradlew build in project's root.
  2. The file located in build/libs.

Contributing

Pull requests are accepted and greatly appreciated. Please be sure to follow the code guidelines stated bellow.

Code Guidelines

License

The contents of this repository are licensed under the MIT license. A copy of the MIT license can be found in LICENSE.

Releases

No releases published

Packages

No packages published