module GitHub.Endpoints.Repos.Releases (
releases,
releases',
releasesR,
release,
release',
releaseR,
latestRelease,
latestRelease',
latestReleaseR,
releaseByTagName,
releaseByTagName',
releaseByTagNameR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import GitHub.Request
import Prelude ()
releases :: Name Owner -> Name Repo -> IO (Either Error (Vector Release))
releases = releases' Nothing
releases' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Release))
releases' auth user repo =
executeRequestMaybe auth $ releasesR user repo FetchAll
releasesR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Release)
releasesR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "releases"] []
release :: Name Owner -> Name Repo -> Id Release -> IO (Either Error Release)
release = release' Nothing
release' :: Maybe Auth -> Name Owner -> Name Repo -> Id Release -> IO (Either Error Release)
release' auth user repo reqReleaseId =
executeRequestMaybe auth $ releaseR user repo reqReleaseId
releaseR :: Name Owner -> Name Repo -> Id Release -> Request k Release
releaseR user repo reqReleaseId =
query ["repos", toPathPart user, toPathPart repo, "releases", toPathPart reqReleaseId ] []
latestRelease :: Name Owner -> Name Repo -> IO (Either Error Release)
latestRelease = latestRelease' Nothing
latestRelease' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Release)
latestRelease' auth user repo =
executeRequestMaybe auth $ latestReleaseR user repo
latestReleaseR :: Name Owner -> Name Repo -> Request k Release
latestReleaseR user repo =
query ["repos", toPathPart user, toPathPart repo, "releases", "latest" ] []
releaseByTagName :: Name Owner -> Name Repo -> Text -> IO (Either Error Release)
releaseByTagName = releaseByTagName' Nothing
releaseByTagName' :: Maybe Auth -> Name Owner -> Name Repo -> Text -> IO (Either Error Release)
releaseByTagName' auth user repo reqTagName =
executeRequestMaybe auth $ releaseByTagNameR user repo reqTagName
releaseByTagNameR :: Name Owner -> Name Repo -> Text -> Request k Release
releaseByTagNameR user repo reqTagName =
query ["repos", toPathPart user, toPathPart repo, "releases", "tags" , reqTagName ] []