class OWMCacheClient[F[_]] extends OWMClient[F]
Blocking OpenWeatherMap client with history (only) cache
Extends OwmClient
, but uses timeouts for requests
WARNING. Caching will not work with free OWM licenses - history plan is required
- Alphabetic
- By Inheritance
- OWMCacheClient
- OWMClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cachingHistoryByCoords(latitude: Float, longitude: Float, dateTime: ZonedDateTime)(implicit M: Monad[F]): F[Either[WeatherError, Weather]]
Overloaded
cachingHistoryByCoords
method withZonedDateTime
instead of Unix epoch timestamp - def cachingHistoryByCoords(latitude: Float, longitude: Float, timestamp: Timestamp)(implicit M: Monad[F]): F[Either[WeatherError, Weather]]
Search history in cache and if not found request and await it from server and put to the cache.
Search history in cache and if not found request and await it from server and put to the cache. If timeout error was taken from cache, do request again
- latitude
event's latitude
- longitude
event's longitude
- timestamp
event's timestamp
- returns
weather stamp immediately taken from cache or requested from server
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def currentByCoords(lat: Float, lon: Float): F[Either[WeatherError, Current]]
Get current weather data by city coordinates Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_weather#2-By-geographic-coordinate
Get current weather data by city coordinates Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_weather#2-By-geographic-coordinate
- lat
latitude
- lon
longitude
- returns
either error or current weather wrapped in
F
- Definition Classes
- OWMClient
- def currentById(id: Int): F[Either[WeatherError, Current]]
Get current weather data by city id Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_weather#3-By-city-ID
Get current weather data by city id Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_weather#3-By-city-ID
- id
id of the city
- returns
either error or current weather wrapped in
F
- Definition Classes
- OWMClient
- def currentByName(name: String, country: OptArg[String], cnt: OptArg[Int] = None): F[Either[WeatherError, Current]]
Get 5 day/3 hour forecast data by city name Docs: http://openweathermap.org/forecast#5days
Get 5 day/3 hour forecast data by city name Docs: http://openweathermap.org/forecast#5days
- name
name of the city
- country
optional two-letter code
- cnt
count of returned data
- returns
either error or forecast wrapped in
F
- Definition Classes
- OWMClient
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def forecastByCoords(lat: Float, lon: Float, cnt: OptArg[Int] = None): F[Either[WeatherError, Weather]]
Get forecast data for coordinates
Get forecast data for coordinates
- lat
latitude
- lon
longitude
- returns
either error or forecast wrapped in
F
- Definition Classes
- OWMClient
- def forecastById(id: Int, cnt: OptArg[Int] = None): F[Either[WeatherError, Forecast]]
Get forecast data by city id Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_forecast#Get-forecast-by-city-id
Get forecast data by city id Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_forecast#Get-forecast-by-city-id
- id
id of the city
- returns
either error or forecast wrapped in
F
- Definition Classes
- OWMClient
- def forecastByName(name: String, country: OptArg[String], cnt: OptArg[Int] = None): F[Either[WeatherError, Forecast]]
Get 5 day/3 hour forecast data by city name Docs: http://openweathermap.org/forecast#5days
Get 5 day/3 hour forecast data by city name Docs: http://openweathermap.org/forecast#5days
- name
name of the city
- country
optional two-letter code
- cnt
count of returned data
- returns
either error or forecast wrapped in
F
- Definition Classes
- OWMClient
- val geoPrecision: Int
nth part of 1 to which latitude and longitude will be rounded
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def historyByCoords(lat: Float, lon: Float, start: OptArg[Long] = None, end: OptArg[Long] = None, cnt: OptArg[Int] = None, measure: OptArg[Measure] = None): F[Either[WeatherError, History]]
Get historical data by city name Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_history#By-city-name
Get historical data by city name Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_history#By-city-name
- lat
lattitude
- lon
longitude
- start
start (unix time, UTC)
- end
end (unix time, UTC)
- cnt
count of returned data
- measure
one of predefined
Api.Measure
values to constrain accuracy- returns
either error or history wrapped in
F
- Definition Classes
- OWMClient
- def historyById(id: Int, start: OptArg[Long] = None, end: OptArg[Long] = None, cnt: OptArg[Int] = None, measure: OptArg[Measure] = None): F[Either[WeatherError, History]]
Get historical data by city id Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_history#By-city-id
Get historical data by city id Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_history#By-city-id
- id
id of the city
- start
start (unix time, UTC)
- end
end (unix time, UTC)
- cnt
count of returned data
- measure
one of predefined
Api.Measure
values to constrain accuracy- returns
either error or history wrapped in
F
- Definition Classes
- OWMClient
- def historyByName(name: String, country: OptArg[String] = None, start: OptArg[Long] = None, end: OptArg[Long] = None, cnt: OptArg[Int] = None, measure: OptArg[Measure] = None): F[Either[WeatherError, History]]
Get historical data by city name Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_history#By-city-name
Get historical data by city name Docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5_history#By-city-name
- name
name of the city
- country
optional two-letter code
- start
start (unix time, UTC)
- end
end (unix time, UTC)
- cnt
count of returned data
- measure
one of predefined
Api.Measure
values to constrain accuracy- returns
either error or history wrapped in
F
- Definition Classes
- OWMClient
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated