----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause -- Maintainer : Oleg Grenrus -- -- The repo invitations API as described on -- . module GitHub.Endpoints.Repos.Invitations ( listInvitationsOnR, listInvitationsForR, acceptInvitationFromR ) where import GitHub.Data import GitHub.Internal.Prelude import Prelude () -- | List open invitations of a repository -- See listInvitationsOnR :: Name Owner -> Name Repo -> FetchCount -> GenRequest 'MtJSON k (Vector RepoInvitation) listInvitationsOnR user repo = PagedQuery ["repos", toPathPart user, toPathPart repo, "invitations"] [] -- | List a user's repository invitations -- See listInvitationsForR :: FetchCount -> Request k (Vector RepoInvitation) listInvitationsForR = pagedQuery ["user", "repository_invitations"] [] -- | Accept a repository invitation -- See acceptInvitationFromR :: Id RepoInvitation -> GenRequest 'MtUnit 'RW () acceptInvitationFromR invId = Command Patch ["user", "repository_invitations", toPathPart invId] mempty