module GitHub.Endpoints.GitData.Trees (
treeR,
nestedTreeR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
treeR :: Name Owner -> Name Repo -> Name Tree -> Request k Tree
treeR :: Name Owner -> Name Repo -> Name Tree -> Request k Tree
treeR Name Owner
user Name Repo
repo Name Tree
sha =
Paths -> QueryString -> Request k Tree
forall (mt :: RW) a. Paths -> QueryString -> Request mt a
query [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"git", Text
"trees", Name Tree -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Tree
sha] []
nestedTreeR :: Name Owner -> Name Repo -> Name Tree -> Request k Tree
nestedTreeR :: Name Owner -> Name Repo -> Name Tree -> Request k Tree
nestedTreeR Name Owner
user Name Repo
repo Name Tree
sha =
Paths -> QueryString -> Request k Tree
forall (mt :: RW) a. Paths -> QueryString -> Request mt a
query [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"git", Text
"trees", Name Tree -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Tree
sha] [(ByteString
"recursive", ByteString -> Maybe ByteString
forall a. a -> Maybe a
Just ByteString
"1")]