OpenMeteoService module
- Source:
Members
(inner, constant) firebaseFunctions
It allows to use firebaseFunctions.
- Source:
(inner, constant) http
It allows to use http.
- Source:
Methods
(inner) ActionWeather(uid) → {Promise}
ActionWeather is a Promise that is used to determine if the weather is fine or not.
Parameters:
Name | Type | Description |
---|---|---|
uid |
string | The unique identifier of a user. |
- Source:
Returns:
A Promise that resolves with a boolean value indicating if the weather is fine or not.
- Type
- Promise
(inner) GetLocation(uid)
GetLocation function retrieves the location data from Firebase for the specified user ID.
Parameters:
Name | Type | Description |
---|---|---|
uid |
(string) user ID |
- Source:
Returns:
Promise that resolves with location data if successful or rejects with an error if unsuccessful
(inner) RegistedRequiredOpenMeteo(uid, data)
Register the user data in the db.
Parameters:
Name | Type | Description |
---|---|---|
uid |
string | user id |
data |
Object | data is an object containing the latitude & longitude |
- Source:
(inner) WeatherisFineOrNot(latitude, longitude) → {Promise}
Check if it is weather is fine or not based on the current date and
time and the weather code provided by the API.
Parameters:
Name | Type | Description |
---|---|---|
latitude |
Latitude of the location to check the weather for. | |
longitude |
Longitude of the location to check the weather for. |
- Source:
Returns:
A promise that resolves to a boolean indicating whether it is
weather is fine or not.
- Type
- Promise