Skip to content

Commit

Permalink
Implement organization.cancel_invitation()
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimpso committed Oct 11, 2021
1 parent 7f458ad commit 7ce916c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions github/Organization.py
Expand Up @@ -1044,6 +1044,17 @@ def invite_user(
input=parameters,
)

def cancel_invitation(self, invitee):
"""
:calls: `DELETE /orgs/{org}/invitations/{invitation_id} <https://docs.github.com/en/rest/reference/orgs#cancel-an-organization-invitation>`_
:param invitee: :class:`github.NamedUser.NamedUser`
:rtype: None
"""
assert isinstance(invitee, github.NamedUser.NamedUser), invitee
headers, data = self._requester.requestJsonAndCheck(
"DELETE", f"{self.url}/invitations/{invitee.id}"
)

def has_in_members(self, member):
"""
:calls: `GET /orgs/{org}/members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
Expand Down

0 comments on commit 7ce916c

Please sign in to comment.