Skip to content

Commit

Permalink
set page size to 100 for accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-oswald committed Jun 3, 2024
1 parent f2ac8ec commit 0d35854
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/up/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Up Bank Integration",
"dependencies": ["http"],
"codeowners": ["@jay-oswald"],
"version": "0.1.0",
"version": "0.2.0",
"integration_type": "hub",
"config_flow": true,
"iot_class": "cloud_polling"
Expand Down
6 changes: 3 additions & 3 deletions custom_components/up/up.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class UP:
def __init__(self, key):
self.api_key = key;

async def call(self, endpoint, data = {}, method="get"):
async def call(self, endpoint, params = {}, method="get"):
headers = { "Authorization": "Bearer " + self.api_key}
match method:
case "get":
async with aiohttp.ClientSession(headers=headers) as session:
async with session.get(base + endpoint) as resp:
async with session.get(base + endpoint, params=params) as resp:
resp.data = await resp.json()
return resp

Expand All @@ -27,7 +27,7 @@ async def test(self, api_key) -> bool:
return result.status == 200

async def getAccounts(self):
result = await self.call('/accounts')
result = await self.call('/accounts',{"page[size]": 100})
if(result.status != 200):
return False

Expand Down

0 comments on commit 0d35854

Please sign in to comment.