openweathermap-fetcher
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -9,2 +9,4 @@ import { ApiConfig } from "./types"; | ||
fetchWeatherDataByCoordinates(latitude: string, longitude: string): Promise<any>; | ||
fetchForecastDataByCityName(cityName: string): Promise<any>; | ||
fetchForecastDataByCoordinates(latitude: string, longitude: string): Promise<any>; | ||
} |
@@ -37,2 +37,8 @@ import { BASEURL } from "./constant.js"; | ||
} | ||
fetchForecastDataByCityName(cityName) { | ||
return this.apiCall(`/forecast`, { q: cityName }); | ||
} | ||
fetchForecastDataByCoordinates(latitude, longitude) { | ||
return this.apiCall(`/forecast`, { lat: latitude, lon: longitude }); | ||
} | ||
} |
{ | ||
"name": "openweathermap-fetcher", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/types/index.d.ts", |
@@ -51,8 +51,14 @@ # Openweathermap-fetcher | ||
1. ```js fetchWeatherDataByCityName(cityName:string)``` | ||
The method will fetch the data by taking cityname as an argument and returns weather data. | ||
1. ``` fetchWeatherDataByCityName(cityName:string)``` | ||
The method will fetch the weather data by taking cityname as an argument and returns weather data. | ||
2. ```js fetchWeatherDataByCoordinates(latitude:string,longitude:string)``` | ||
This method will fetch the data by taking longitude and latitude as an argument and returns weather data. | ||
2. ``` fetchWeatherDataByCoordinates(latitude:string,longitude:string)``` | ||
This method will fetch the weather data by taking longitude and latitude as an argument and returns weather data. | ||
3. ``` fetchForecastDataByCityName(cityName:string)``` | ||
The method will fetch the forecast data by taking cityname as an argument and returns weather data. | ||
4. ``` fetchForecastDataByCoordinates(latitude:string,longitude:string)``` | ||
This method will fetch the forecast data by taking longitude and latitude as an argument and returns weather data. | ||
## Contribution | ||
@@ -59,0 +65,0 @@ |
6485
12
67
74