Trait

com.snowplowanalytics.weather.providers.openweather

Client

Related Doc: package openweather

Permalink

trait Client[Response[_]] extends AnyRef

Base client trait with defined client methods such a historyById, historyByName common for subclasses

Response

response wrapper for Client subclass, such as Future all receive logic should be wrapped in it

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def receive[W <: OwmResponse](owmRequest: OwmRequest)(implicit arg0: Manifest[W]): Response[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

    owmRequest

    request built by client method

    returns

    extracted either error or weather

Concrete 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): Response[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

  7. def currentById(id: Int): Response[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

  8. def currentByName(name: String, country: OptArg[String], cnt: OptArg[Int] = None): Response[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

  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]
  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): Response[Weather]

    Permalink

    Get forecast data for coordinates

    Get forecast data for coordinates

    lat

    latitude

    lon

    longitude

    returns

    either error or forecast wrapped in Response

  14. def forecastById(id: Int, cnt: OptArg[Int] = None): Response[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

  15. def forecastByName(name: String, country: OptArg[String], cnt: OptArg[Int] = None): Response[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

  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): Response[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

  19. def historyById(id: Int, start: OptArg[Int] = None, end: OptArg[Int] = None, cnt: OptArg[Int] = None, measure: OptArg[Api.Measures.Value] = None): Response[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

  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): Response[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

  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. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped