module GitHub.Endpoints.Repos.Releases (
releasesR,
releaseR,
latestReleaseR,
releaseByTagNameR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
releasesR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Release)
releasesR :: forall (k :: RW).
Name Owner -> Name Repo -> FetchCount -> Request k (Vector Release)
releasesR Name Owner
user Name Repo
repo =
Paths -> QueryString -> FetchCount -> Request k (Vector Release)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [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
"releases"] []
releaseR :: Name Owner -> Name Repo -> Id Release -> Request k Release
releaseR :: forall (k :: RW).
Name Owner -> Name Repo -> Id Release -> Request k Release
releaseR Name Owner
user Name Repo
repo Id Release
reqReleaseId =
Paths -> QueryString -> Request k Release
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
"releases", Id Release -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Release
reqReleaseId ] []
latestReleaseR :: Name Owner -> Name Repo -> Request k Release
latestReleaseR :: forall (k :: RW). Name Owner -> Name Repo -> Request k Release
latestReleaseR Name Owner
user Name Repo
repo =
Paths -> QueryString -> Request k Release
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
"releases", Text
"latest" ] []
releaseByTagNameR :: Name Owner -> Name Repo -> Text -> Request k Release
releaseByTagNameR :: forall (k :: RW).
Name Owner -> Name Repo -> Text -> Request k Release
releaseByTagNameR Name Owner
user Name Repo
repo Text
reqTagName =
Paths -> QueryString -> Request k Release
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
"releases", Text
"tags" , Text
reqTagName ] []