Skip to content

Commit

Permalink
feat: invite/limitをサポート
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Nov 30, 2023
1 parent 42526ee commit 54f97bb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mipac/actions/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,18 @@ async def get_all_list(
for raw_code in raw_codes:
yield InviteCode(raw_code, client=self._client)

async def get_limit(self) -> InviteLimit:
"""Get the number of invite codes you can create.
Endpoint: `/api/invite/limit`
Returns
-------
int
The number of invite codes you can create.
"""

raw_invite_limit: IInviteLimit = await self._session.request(
Route("POST", "/api/invite/limit"), auth=True
)
return InviteLimit(raw_invite_limit, client=self._client)

0 comments on commit 54f97bb

Please sign in to comment.