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

    Function listWeatherPlaces

    • Reads every place in the Pebble app's weather list from its built-in Preferences plugin, the ones with no coordinates included, for a caller that has to show or keep the whole list, such as a settings page.

      Each place comes back in the wearer's order with its key, its name, whether it is the current location, and located, which says whether it has coordinates and so can be fetched. A place with coordinates carries them. An instance with no key is left out, since nothing could find it again, and one with no properties yet is listed with an empty name and located false. It makes no subscription unless subscribe is set, so a settings page reading the list does not ask the Pebble app to run the plugin again. A read the Pebble app refuses hands back no places and the reason, or NO_REASON when the refusal names none.

      Parameters

      • pebble: PluginPebble

        The plugin runtime's Pebble.

      • options: { subscribe?: boolean } = {}

        Set subscribe to also subscribe to the list, as weatherLocations does, so the Pebble app runs the plugin again when the wearer changes it.

      Returns Promise<{ error?: string; places: ListedWeatherPlace[] }>

      Every place in the wearer's order, and the reason when the read failed.