module GitHub.Endpoints.Activity.Watching (
watchersForR,
reposWatchedByR,
unwatchRepoR,
module GitHub.Data,
) where
import GitHub.Auth
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
watchersForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
watchersForR :: forall (k :: RW).
Name Owner
-> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
watchersForR Name Owner
user Name Repo
repo FetchCount
limit =
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"watchers"] [] FetchCount
limit
reposWatchedByR :: Name Owner -> FetchCount -> Request k (Vector Repo)
reposWatchedByR :: forall (k :: RW).
Name Owner -> FetchCount -> Request k (Vector Repo)
reposWatchedByR Name Owner
user =
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"users", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Text
"subscriptions"] []
unwatchRepoR :: Name Owner -> Name Repo -> Request 'RW ()
unwatchRepoR :: Name Owner -> Name Repo -> Request 'RW ()
unwatchRepoR Name Owner
owner Name Repo
repo =
forall a. CommandMethod -> Paths -> ByteString -> Request 'RW a
command CommandMethod
Delete [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
owner, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"subscription"] forall a. Monoid a => a
mempty