A Java wrapper for NASA's open API.
This is a Java wrapper for NASA’s open API. The current services that are supported by this wrapper, include:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
In order to utilize or contribute to this API wrapper, you first need to retrieve an API key. Follow the instructions at this link get your API key. Once you have your API key, I recommend exporting it as an environment variable. If this isn’t a possible or viable option for your needs, then simply use ApiRequest.setApiKey(String apiKey)
to manually set your key.
WARNING: I recommend not hard-coding the api key String inside of your code.
To permanently store your API key, open up a terminal window. Using the text editor of your choosing, open your ~/.bashrc file. Type the following, somewhere inside your ~/.bashrc file:
export NASA_API_KEY=<your_nasa_key>
Save the file. Then when back in the shell, source your ~/.bashrc file:
source ~/.bashrc
To temporarily store your API key in your current shell session, simply type into the terminal:
export NASA_API_KEY=<your_nasa_key>
In Progress
The Development Environment I’ve Used:
OS: Ubuntu 16.04 IDE: Eclipse Neon JDK/JRE: java-1.8 (java-8-oracle) Testing: Junit4 Build: Maven
Pull requests are welcome for the develop branch, as long as they are tested and pass the build tests in Maven.
git clone https://github.com/MorrisLaw/Java-Wrapper-Nasa-Api.git
Jeremy L. Morris, jeremylevanmorris@gmail.com