Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tixte/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ def __init__(self, session: Optional[aiohttp.ClientSession] = None) -> None:


async def request(self, route: Route, **kwargs: Any) -> Dict:
async with self.session.request(route.method, route.url, {**route.parameters, **kwargs}) as resp:
kwargs = {**route.parameters, **kwargs}
async with self.session.request(route.method, route.url, **kwargs) as resp:
if resp.status != 200:
raise NotImplementedError("API status was not 200, this hasn't been implemented yet.")

# We're going to assume the API returns Dict for now.
# We'll change this later as I get more info.
return await resp.json()


return await resp.json()