module GitHub.Endpoints.Repos.Collaborators (
collaboratorsOnR,
collaboratorPermissionOnR,
isCollaboratorOnR,
addCollaboratorR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
collaboratorsOnR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
collaboratorsOnR :: forall (k :: RW).
Name Owner
-> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
collaboratorsOnR Name Owner
user Name Repo
repo =
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"collaborators"] []
collaboratorPermissionOnR
:: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtJSON rw CollaboratorWithPermission
collaboratorPermissionOnR :: forall (rw :: RW).
Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtJSON rw CollaboratorWithPermission
collaboratorPermissionOnR Name Owner
owner Name Repo
repo Name User
coll =
forall (mt :: RW) a. Paths -> QueryString -> Request mt a
query [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
owner, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"collaborators", forall a. IsPathPart a => a -> Text
toPathPart Name User
coll, Text
"permission"] []
isCollaboratorOnR
:: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtStatus rw Bool
isCollaboratorOnR :: forall (rw :: RW).
Name Owner
-> Name Repo -> Name User -> GenRequest 'MtStatus rw Bool
isCollaboratorOnR Name Owner
user Name Repo
repo Name User
coll =
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"collaborators", forall a. IsPathPart a => a -> Text
toPathPart Name User
coll] []
addCollaboratorR
:: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtJSON 'RW (Maybe RepoInvitation)
addCollaboratorR :: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtJSON 'RW (Maybe RepoInvitation)
addCollaboratorR Name Owner
owner Name Repo
repo Name User
coll =
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Put [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
owner, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"collaborators", forall a. IsPathPart a => a -> Text
toPathPart Name User
coll] forall a. Monoid a => a
mempty