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