Skip to content

Commit daaf410

Browse files
committed
Replicating changes by Franzqat from #345
1 parent 2b2ba96 commit daaf410

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Code
2727
Docs
2828
----
2929
* [EJEP](https://github.com/EJEP)
30+
* [Franzqat](https://github.com/franzqat)
3031
* [Harmon758](https://github.com/Harmon758)
3132

3233
Testing

sphinx/v3/code-recipes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ mgr = owm.weather_manager()
450450
my_city_id = 12345
451451
moscow_lat = 55.75222
452452
moscow_lon = 37.615555
453-
weather_at_moscow = owm.weather_at_coords(moscow_lat, moscow_lon).weather
453+
weather_at_moscow = mgr.weather_at_coords(moscow_lat, moscow_lon).weather
454454
```
455455

456456
### Get weather at city IDs
@@ -461,8 +461,8 @@ You can enquire the observed weather on a city ID:
461461
from pyowm.owm import OWM
462462
owm = OWM('your-api-key')
463463
mgr = owm.weather_manager()
464-
my_city_id = 12345
465-
weather = owm.weather_at_id(my_city_id).weather
464+
my_city_id = 2643743 #London
465+
weather = mgr.weather_at_id(my_city_id).weather
466466
```
467467

468468
or on a list of city IDs:
@@ -471,8 +471,8 @@ or on a list of city IDs:
471471
from pyowm.owm import OWM
472472
owm = OWM('your-api-key')
473473
mgr = owm.weather_manager()
474-
my_list_of_city_ids = [12345, 67890, 54321]
475-
list_of_observations = owm.weather_at_ids(my_list_of_city_ids)
474+
my_list_of_city_ids = [2643743 , 4517009, 5056033]
475+
list_of_observations = mgr.weather_at_ids(my_list_of_city_ids)
476476
corresponding_weathers_list = [ obs.weather for obs in list_of_observations ]
477477
```
478478

0 commit comments

Comments
 (0)