Skip to content

Commit

Permalink
Code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdoehring committed Nov 20, 2024
1 parent 492b057 commit a556bb9
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions app/bluetrax.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio
import json
from typing import List
from datetime import datetime, timezone, timedelta
from datetime import datetime, timezone
from gql import gql, Client
from gql.transport.httpx import HTTPXAsyncTransport
import httpx
Expand Down Expand Up @@ -125,13 +124,3 @@ async def get_asset_history(unit_id: str, start_time: datetime, end_time: dateti
return HistoryResult(**r.json())
else:
return None

if __name__ == "__main__":
auth_result = asyncio.run(authenticate("securityadmin@loisaba.com", "Nanyorryang"))
# print(val)

assets = asyncio.run(get_assets(auth_result.users[0].user_id))
end_date = datetime.now(tz=timezone.utc)
val = asyncio.run(get_asset_history(int(assets.userAssets[0].unit_id), end_date - timedelta(minutes=20), end_date))

print(val.json(indent=2))

0 comments on commit a556bb9

Please sign in to comment.