module Github.Repos.Comments (
commentsFor,
commentsFor',
commentsForR,
commitCommentsFor,
commitCommentsFor',
commitCommentsForR,
commitCommentFor,
commitCommentFor',
commitCommentForR,
module Github.Data,
) where
import Data.Vector (Vector)
import Github.Auth
import Github.Data
import Github.Request
commentsFor :: Name GithubOwner -> Name Repo -> IO (Either Error (Vector Comment))
commentsFor = commentsFor' Nothing
commentsFor' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error (Vector Comment))
commentsFor' auth user repo =
executeRequestMaybe auth $ commentsForR user repo Nothing
commentsForR :: Name GithubOwner -> Name Repo -> Maybe Count -> GithubRequest k (Vector Comment)
commentsForR user repo =
GithubPagedGet ["repos", toPathPart user, toPathPart repo, "comments"] []
commitCommentsFor :: Name GithubOwner -> Name Repo -> Name Commit -> IO (Either Error (Vector Comment))
commitCommentsFor = commitCommentsFor' Nothing
commitCommentsFor' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> Name Commit -> IO (Either Error (Vector Comment))
commitCommentsFor' auth user repo sha =
executeRequestMaybe auth $ commitCommentsForR user repo sha Nothing
commitCommentsForR :: Name GithubOwner -> Name Repo -> Name Commit -> Maybe Count -> GithubRequest k (Vector Comment)
commitCommentsForR user repo sha =
GithubPagedGet ["repos", toPathPart user, toPathPart repo, "commits", toPathPart sha, "comments"] []
commitCommentFor :: Name GithubOwner -> Name Repo -> Id Comment -> IO (Either Error Comment)
commitCommentFor = commitCommentFor' Nothing
commitCommentFor' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> Id Comment -> IO (Either Error Comment)
commitCommentFor' auth user repo cid =
executeRequestMaybe auth $ commitCommentForR user repo cid
commitCommentForR :: Name GithubOwner -> Name Repo -> Id Comment -> GithubRequest k Comment
commitCommentForR user repo cid =
GithubGet ["repos", toPathPart user, toPathPart repo, "comments", toPathPart cid] []