module GitHub.Endpoints.Activity.Starring (
stargazersForR,
reposStarredByR,
myStarredR,
myStarredAcceptStarR,
starRepoR,
unstarRepoR,
module GitHub.Data,
) where
import GitHub.Auth
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
stargazersForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
stargazersForR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "stargazers"] []
reposStarredByR :: Name Owner -> FetchCount -> Request k (Vector Repo)
reposStarredByR user =
pagedQuery ["users", toPathPart user, "starred"] []
myStarredR :: FetchCount -> Request 'RA (Vector Repo)
myStarredR = pagedQuery ["user", "starred"] []
myStarredAcceptStarR :: FetchCount -> GenRequest 'MtStar 'RA (Vector RepoStarred)
myStarredAcceptStarR = PagedQuery ["user", "starred"] []
starRepoR :: Name Owner -> Name Repo -> GenRequest 'MtUnit 'RW ()
starRepoR user repo = Command Put paths mempty
where
paths = ["user", "starred", toPathPart user, toPathPart repo]
unstarRepoR :: Name Owner -> Name Repo -> GenRequest 'MtUnit 'RW ()
unstarRepoR user repo = Command Delete paths mempty
where
paths = ["user", "starred", toPathPart user, toPathPart repo]