Skip to content

ClimaCell API

Youssef-Beltagy edited this page Feb 27, 2021 · 1 revision

We get our weather information from https://www.climacell.co/weather-api/.

The documentation is here: https://docs.climacell.co/reference/api-overview

It seems httpClient is deprecated: https://stackoverflow.com/questions/29294479/android-deprecated-apache-module-httpclient-httpresponse-etc

I will probably use Volley for my http request. https://developer.android.com/training/volley

Synchronous vs Asynchronous callbacks.

I'm thinking of using retrofit: https://developer.android.com/training/basics/network-ops/connecting

https://www.youtube.com/watch?v=4JGvDUlfk7Y&ab_channel=CodinginFlow

For now, I will store the keys in an external file: https://guides.codepath.com/android/Storing-Secret-Keys-in-Android#secrets-in-resource-files

The fields we are interested in are:

  • temperature int or double celsius
  • humidity int or double %
  • epaIndex int 0-301
  • precipitationIntensity int or double mm/hr
  • treeIndex (0-5)
    • 0: None
    • 1: Very low
    • 2: Low
    • 3: Medium
    • 4: High
    • 5: Very High
  • grassIndex (0-5)
    • 0: None
    • 1: Very low
    • 2: Low
    • 3: Medium
    • 4: High
    • 5: Very High

Sample API request:

https://data.climacell.co/v4/timelines? location=-47.6062%2C122.3321 &fields=temperature &startTime=2021-01-02T06%3A05%3A00Z &endTime=2021-01-02T06%3A08%3A00Z& timesteps=1m &apikey=

My apikey is: 66HG6MstL4fWIVPLUrYdTR7jTwcdEzMr

Clone this wiki locally