module GitHub.Endpoints.Repos.Collaborators (
collaboratorsOn,
collaboratorsOn',
collaboratorsOnR,
isCollaboratorOn,
isCollaboratorOnR,
module GitHub.Data,
) where
import Data.Vector (Vector)
import GitHub.Data
import GitHub.Request
collaboratorsOn :: Name Owner -> Name Repo -> IO (Either Error (Vector SimpleUser))
collaboratorsOn = collaboratorsOn' Nothing
collaboratorsOn' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector SimpleUser))
collaboratorsOn' auth user repo =
executeRequestMaybe auth $ collaboratorsOnR user repo Nothing
collaboratorsOnR :: Name Owner -> Name Repo -> Maybe Count -> Request k (Vector SimpleUser)
collaboratorsOnR user repo =
PagedQuery ["repos", toPathPart user, toPathPart repo, "collaborators"] []
isCollaboratorOn :: Maybe Auth
-> Name Owner
-> Name Repo
-> Name User
-> IO (Either Error Bool)
isCollaboratorOn auth user repo coll =
executeRequestMaybe auth $ isCollaboratorOnR user repo coll
isCollaboratorOnR :: Name Owner
-> Name Repo
-> Name User
-> Request k Bool
isCollaboratorOnR user repo coll = StatusQuery StatusOnlyOk $
Query ["repos", toPathPart user, toPathPart repo, "collaborators", toPathPart coll] []