Class/Object

com.snowplowanalytics.weather.providers.openweather

OwmAsyncClient

Related Docs: object OwmAsyncClient | package openweather

Permalink

class OwmAsyncClient extends Client[AsyncWeather]

Asynchronous OpenWeatherMap client

Linear Supertypes
Client[AsyncWeather], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OwmAsyncClient
  2. Client
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OwmAsyncClient(appId: String, transport: HttpAsyncTransport)

    Permalink

    appId

    API key

    transport

    HTTP client for send requests, receive responses

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def currentByCoords(lat: Float, lon: Float): AsyncWeather[Current]

    Permalink

    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 Response

    Definition Classes
    Client
  7. def currentById(id: Int): AsyncWeather[Current]

    Permalink

    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 Response

    Definition Classes
    Client
  8. def currentByName(name: String, country: OptArg[String], cnt: OptArg[Int] = None): AsyncWeather[Current]

    Permalink

    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 Response

    Definition Classes
    Client
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def extractWeather[W](response: JValue)(implicit arg0: Manifest[W]): Either[WeatherError, W]

    Permalink

    Transform JSON into parseable format and try to extract specified response

    Transform JSON into parseable format and try to extract specified response

    W

    specific response case class from com.snowplowanalytics.weather.providers.openweather.Responses

    response

    either of previous or JSON

    returns

    either error string or response case class

    Attributes
    protected[com.snowplowanalytics.weather.providers.openweather]
    Definition Classes
    Client
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def forecastByCoords(lat: Float, lon: Float, cnt: OptArg[Int] = None): AsyncWeather[Weather]

    Permalink

    Get forecast data for coordinates

    Get forecast data for coordinates

    lat

    latitude

    lon

    longitude

    returns

    either error or forecast wrapped in Response

    Definition Classes
    Client
  14. def forecastById(id: Int, cnt: OptArg[Int] = None): AsyncWeather[Forecast]

    Permalink

    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 Response

    Definition Classes
    Client
  15. def forecastByName(name: String, country: OptArg[String], cnt: OptArg[Int] = None): AsyncWeather[Forecast]

    Permalink

    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 Response

    Definition Classes
    Client
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. def historyByCoords(lat: Float, lon: Float, start: OptArg[Int] = None, end: OptArg[Int] = None, cnt: OptArg[Int] = None, measure: OptArg[Api.Measures.Value] = None): AsyncWeather[History]

    Permalink

    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.Measures to constrain accuracy

    returns

    either error or history wrapped in Response

    Definition Classes
    Client
  19. def historyById(id: Int, start: OptArg[Int] = None, end: OptArg[Int] = None, cnt: OptArg[Int] = None, measure: OptArg[Api.Measures.Value] = None): AsyncWeather[History]

    Permalink

    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.Measures to constrain accuracy

    returns

    either error or history wrapped in Response

    Definition Classes
    Client
  20. def historyByName(name: String, country: OptArg[String] = None, start: OptArg[Int] = None, end: OptArg[Int] = None, cnt: OptArg[Int] = None, measure: OptArg[Api.Measures.Value] = None): AsyncWeather[History]

    Permalink

    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.Measures to constrain accuracy

    returns

    either error or history wrapped in Response

    Definition Classes
    Client
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def receive[W <: OwmResponse](request: OwmRequest)(implicit arg0: Manifest[W]): Future[Either[WeatherError, W]]

    Permalink

    Main client logic for Request => Response function, where Response is wrappeed in tparam Response

    Main client logic for Request => Response function, where Response is wrappeed in tparam Response

    W

    type of weather response to extract

    returns

    extracted either error or weather

    Definition Classes
    OwmAsyncClientClient
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Client[AsyncWeather]

Inherited from AnyRef

Inherited from Any

Ungrouped