module GitHub.Endpoints.GitData.Trees (
tree,
tree',
treeR,
nestedTree,
nestedTree',
nestedTreeR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import GitHub.Request
import Prelude ()
tree' :: Maybe Auth -> Name Owner -> Name Repo -> Name Tree -> IO (Either Error Tree)
tree' auth user repo sha =
executeRequestMaybe auth $ treeR user repo sha
tree :: Name Owner -> Name Repo -> Name Tree -> IO (Either Error Tree)
tree = tree' Nothing
treeR :: Name Owner -> Name Repo -> Name Tree -> Request k Tree
treeR user repo sha =
query ["repos", toPathPart user, toPathPart repo, "git", "trees", toPathPart sha] []
nestedTree' :: Maybe Auth -> Name Owner -> Name Repo -> Name Tree -> IO (Either Error Tree)
nestedTree' auth user repo sha =
executeRequestMaybe auth $ nestedTreeR user repo sha
nestedTree :: Name Owner -> Name Repo -> Name Tree -> IO (Either Error Tree)
nestedTree = nestedTree' Nothing
nestedTreeR :: Name Owner -> Name Repo -> Name Tree -> Request k Tree
nestedTreeR user repo sha =
query ["repos", toPathPart user, toPathPart repo, "git", "trees", toPathPart sha] [("recursive", Just "1")]