module GitHub.Endpoints.Gists (
gistsR,
gistR,
starGistR,
unstarGistR,
deleteGistR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
gistsR :: Name Owner -> FetchCount -> Request k (Vector Gist)
gistsR user = pagedQuery ["users", toPathPart user, "gists"] []
gistR :: Name Gist -> Request k Gist
gistR gid =
query ["gists", toPathPart gid] []
starGistR :: Name Gist -> GenRequest 'MtUnit 'RW ()
starGistR gid = Command Put ["gists", toPathPart gid, "star"] mempty
unstarGistR :: Name Gist -> GenRequest 'MtUnit 'RW ()
unstarGistR gid = Command Delete ["gists", toPathPart gid, "star"] mempty
deleteGistR :: Name Gist -> GenRequest 'MtUnit 'RW ()
deleteGistR gid = Command Delete ["gists", toPathPart gid] mempty