reports: Allow passing FindMyAccessory directly into BaseAppleAccount.fetch_reports

This commit is contained in:
Mike A
2024-04-24 15:42:51 +02:00
parent 52952bc189
commit 83f7077c12
5 changed files with 205 additions and 30 deletions

View File

@@ -27,8 +27,9 @@ async def fetch_reports(lookup_key: KeyPair) -> None:
print(f"Logged in as: {acc.account_name} ({acc.first_name} {acc.last_name})")
# It's that simple!
reports = await acc.fetch_last_reports([lookup_key])
print(reports)
reports = await acc.fetch_last_reports(lookup_key)
for report in sorted(reports):
print(report)
finally:
await acc.close()