Skip to content

Commit

Permalink
update usage code in readme (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiraware authored Jul 13, 2024
1 parent 2ddd40c commit a652c1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ async def main():
async with BMKG() as bmkg:
weather_forecast = await bmkg.weather_forecast.get_weather_forecast(Province.ACEH)
latest_earthquake = await bmkg.earthquake.get_latest_earthquake()
strong_earthquake = await bmkg.earthquake.get_strong_earthquake()
felt_earthquake = await bmkg.earthquake.get_felt_earthquake()

print(f'Weather Forecast: {weather_forecast}')
print(f'Latest Earthquakes: {latest_earthquake}')
print(f"Strong Earthquakes: {strong_earthquake}")
print(f"Felt Earthquakes: {felt_earthquake}")

asyncio.run(main())
```
Expand Down
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ async def main():
async with BMKG() as bmkg:
weather_forecast = await bmkg.weather_forecast.get_weather_forecast(Province.ACEH)
latest_earthquake = await bmkg.earthquake.get_latest_earthquake()
strong_earthquake = await bmkg.earthquake.get_strong_earthquake()
felt_earthquake = await bmkg.earthquake.get_felt_earthquake()

print(f'Weather Forecast: {weather_forecast}')
print(f'Latest Earthquakes: {latest_earthquake}')
print(f"Strong Earthquakes: {strong_earthquake}")
print(f"Felt Earthquakes: {felt_earthquake}")

asyncio.run(main())
```
Expand Down

0 comments on commit a652c1e

Please sign in to comment.