module GitHub.Endpoints.Activity.Watching (
watchersFor,
watchersFor',
watchersForR,
reposWatchedBy,
reposWatchedBy',
reposWatchedByR,
module GitHub.Data,
) where
import GitHub.Auth
import GitHub.Data
import GitHub.Internal.Prelude
import GitHub.Request
import Prelude ()
watchersFor :: Name Owner -> Name Repo -> IO (Either Error (Vector SimpleUser))
watchersFor = watchersFor' Nothing
watchersFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector SimpleUser))
watchersFor' auth user repo =
executeRequestMaybe auth $ watchersForR user repo FetchAll
watchersForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
watchersForR user repo limit =
pagedQuery ["repos", toPathPart user, toPathPart repo, "watchers"] [] limit
reposWatchedBy :: Name Owner -> IO (Either Error (Vector Repo))
reposWatchedBy = reposWatchedBy' Nothing
reposWatchedBy' :: Maybe Auth -> Name Owner -> IO (Either Error (Vector Repo))
reposWatchedBy' auth user =
executeRequestMaybe auth $ reposWatchedByR user FetchAll
reposWatchedByR :: Name Owner -> FetchCount -> Request k (Vector Repo)
reposWatchedByR user =
pagedQuery ["users", toPathPart user, "subscriptions"] []