module GitHub.Endpoints.Users.PublicSSHKeys (
publicSSHKeysR,
publicSSHKeysForR,
publicSSHKeyR,
createUserPublicSSHKeyR,
deleteUserPublicSSHKeyR,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
publicSSHKeysForR :: Name Owner -> FetchCount -> Request 'RO (Vector PublicSSHKeyBasic)
publicSSHKeysForR user =
pagedQuery ["users", toPathPart user, "keys"] []
publicSSHKeysR :: Request 'RA (Vector PublicSSHKey)
publicSSHKeysR =
query ["user", "keys"] []
publicSSHKeyR :: Id PublicSSHKey -> Request 'RA PublicSSHKey
publicSSHKeyR keyId =
query ["user", "keys", toPathPart keyId] []
createUserPublicSSHKeyR :: NewPublicSSHKey -> Request 'RW PublicSSHKey
createUserPublicSSHKeyR key =
command Post ["user", "keys"] (encode key)
deleteUserPublicSSHKeyR :: Id PublicSSHKey -> GenRequest 'MtUnit 'RW ()
deleteUserPublicSSHKeyR keyId =
Command Delete ["user", "keys", toPathPart keyId] mempty