From 1b62888efa494229aaa5033c762f661ff801c389 Mon Sep 17 00:00:00 2001 From: Kira <117554978+kiraware@users.noreply.github.com> Date: Sat, 13 Jul 2024 09:43:28 +0800 Subject: [PATCH] add usage code --- README.md | 4 ++++ docs/index.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index cfb0d1b..b3c84a8 100644 --- a/README.md +++ b/README.md @@ -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()) ``` diff --git a/docs/index.md b/docs/index.md index 901f38e..c56efaf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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()) ```