Last active
July 9, 2020 11:38
-
-
Save thisiszoaib/54e5a617c24e3648fe93cfbc5fbeaf3d to your computer and use it in GitHub Desktop.
Weather 12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getWeatherForCity(city: string): Observable<any> { | |
| const path = `https://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&APPID=695ed9f29c4599b7544d0db5c211d499`; | |
| return this.http.get(path).pipe( | |
| map(data => ({ | |
| ...data, | |
| image: `http://openweathermap.org/img/wn/${data.weather[0].icon}@2x.png` | |
| })), | |
| delay(500) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment