/DarkSkyMongoApi

A simple api that can be used to analyze historical darkSky data.

Primary LanguageJava

Data Analyzer with Cache API for DarkSky

This is an example of how to build an API that will utilize the DarkSky api for historical data, cache results in DB, analyze results, then return analysis a to the client. This app can be expanded to process additional data from DarkSky. The cool thing about this api is that it will only call the Dark Sky api 1 time for a particular day. This will help to keep the number of calls to Dark Sky down and therefor will lower your usage cost.

Here are the current endpoints:

URLs CRUD Description
http://localhost:8080/api/health GET Validates Health
http://localhost:8080/api/weather/airport?start_date={starting time in EpochSeconds}&end_date={ending time in EpochSeconds} POST Will return analysis of DarkSky data between the two date ranges.

I used the following:

  • Jersey 2
  • Spring 4
  • mongo-java-driver 2
  • spring-data-mongodb 1.2

I'm building with Gradle:

  • gradle 3.2.1

In this project I also tested with difference frameworks

  • junit 4.10
  • JMockit 1.24
  • hamcrest 1.3