Pebble App Framework: Phone API
    Preparing search index...

    Function fetchReading

    • Fetches a reading for several places from OpenWeatherMap, with the series, the offset, the sun times, the UV, and the dew point from one batched Open-Meteo request.

      It asks in metric units whatever the wearer's, since a reading keeps °C and km/h.

      Parameters

      • places: (WeatherCoords | null | undefined)[]

        Each place's coordinates, in the order the readings come back.

      • key: string

        The wearer's OpenWeatherMap key.

      • request: RequestFn

        The function that performs the actual network request.

      • done: (results: ReadingResult[]) => void

        Called once with a reading or a status for each place, in the order asked.

      • OptionalonSend: SendHook

        Hears each request go out, so a plugin can stamp it then, as fetchPairedReading says.

      Returns void