johnluetke / WeatherAPI

Abstracts online weather services into a simple API
Apache License 2.0
14 stars 4 forks source link

Add ability to construct a new WeatherAPI instance with credentials #12

Open alexanderdean opened 10 years ago

alexanderdean commented 10 years ago

Because reading a WeatherAPI.properties on the classpath is too inflexible.

johnluetke commented 10 years ago

Does the changes introduced in 34546827bc60d0735b5bb619a2829295292286b5 solve this for you?

alexanderdean commented 10 years ago

It's definitely more flexible but I'd prefer an explicit constructor:

WeatherAPI instance = new WeatherAPI(credentials, lruCacheSize, etc)
johnluetke commented 10 years ago

My only reservation with an explicit constructor is all the overloading that would need to be done for different sets of parameters. Some kind of config object that can be passed in would solve this, however.

alexanderdean commented 9 years ago

As a quick heads-up - Snowplow wintern @AALEKH is working on a PR to add this functionality. We need this to deliver the weather enrichment in Snowplow...