We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 421308c commit 6ae07abCopy full SHA for 6ae07ab
1 file changed
xbox/webapi/api/provider/message/__init__.py
@@ -16,16 +16,17 @@ class MessageProvider(BaseProvider):
16
HEADERS_MESSAGE = {"x-xbl-contract-version": "1"}
17
HEADERS_HORIZON = {"x-xbl-contract-version": "2"}
18
19
- async def get_inbox(self, **kwargs) -> InboxResponse:
+ async def get_inbox(self, max_items: int = 100, **kwargs) -> InboxResponse:
20
"""
21
Get messages
22
23
Returns:
24
:class:`InboxResponse`: Inbox Response
25
26
url = f"{self.MSG_URL}/network/Xbox/users/me/inbox"
27
+ params = {"maxItems": max_items}
28
resp = await self.client.session.get(
- url, headers=self.HEADERS_MESSAGE, **kwargs
29
+ url, params=params, headers=self.HEADERS_MESSAGE, **kwargs
30
)
31
resp.raise_for_status()
32
return InboxResponse.parse_raw(await resp.text())
0 commit comments