Weather API
Mahad Haqqi
Last Update pre 2 godine
Description
Weather API - Powered by OpenWeather
This plugin integrates multiple APIs from OpenWeather to provide comprehensive weather-related data for your Bubble application:
- Current Weather API: Get up-to-date weather conditions for any location worldwide.(https://openweathermap.org/current)
- 3-Hour Forecast API: Receive 3-hour forecasts for up to 5 days ahead.(https://openweathermap.org/forecast5)
- Air Pollution API: Retrieve air quality data for any given location.(https://openweathermap.org/api/air-pollution)
- Geocoding API: Convert addresses to coordinates and vice versa(https://openweathermap.org/api/geocoding-api)
All APIs are free to use but come with daily limits on the number of API calls. For more details on usage limits, visit the OpenWeatherMap pricing page.
Instructions
This plugin supports data and action-type API calls, enabling you to fetch weather data in real time and trigger weather-related actions in your workflows. Here's how to use each:
Data API calls are used to retrieve weather information and display it dynamically on your app. You can access data for current weather, forecasts, air pollution, and more.
Steps to Use:
- Add the Plugin: Install the Weather Plugin from the plugin section in Bubble.
- Element Setup: In your app’s design tab, add elements such as text, groups, or weather maps to display the weather data.
- Data Source:
- Select the data call from the plugin for the required weather information:
- Current Weather Data
- 3-Hour Forecast
- Air Pollution Data
- Geocoding
- Provide the necessary inputs (e.g., location, coordinates, or city name).
- Set the data source to the plugin’s call to fetch the required weather information.
- Select the data call from the plugin for the required weather information:
- Display Data: Bind the fetched data to the elements in your app (e.g., display temperature, weather conditions, or pollution levels).
Action-type calls let you trigger weather-related events and workflows. You can use these to perform tasks like storing weather data, updating locations, or embedding widgets.
Steps to Use:
- Add an Action: In the workflow editor, select the appropriate weather-related action from the plugin:
- Current Weather Data
- 3-Hour Forecast
- Air Pollution Data
- Geocoding
- Set Parameters: Define parameters such as location, city name, or latitude/longitude as inputs.
- Trigger Workflows: Integrate the action into your workflow, like when a user searches for a location or when an event is triggered to update weather data dynamically.
- Store or Display Data: Once the action is triggered, you can store the weather information in custom states or a database or display it directly on the screen.
