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 =
Paths -> QueryString -> FetchCount -> Request k (Vector SimpleUser)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Repo -> Text
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 =
Paths -> QueryString -> FetchCount -> Request k (Vector Repo)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"users", Name Owner -> Text
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 =
CommandMethod -> Paths -> ByteString -> Request 'RW ()
forall a. CommandMethod -> Paths -> ByteString -> Request 'RW a
command CommandMethod
Delete [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
owner, Name Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"subscription"] ByteString
forall a. Monoid a => a
mempty