module Github.Activity.Starring (
stargazersFor,
stargazersForR,
reposStarredBy,
reposStarredByR,
myStarred,
myStarredR,
module Github.Data,
) where
import Data.Vector (Vector)
import Github.Auth
import Github.Data
import Github.Request
stargazersFor :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error (Vector GithubOwner))
stargazersFor auth user repo =
executeRequestMaybe auth $ stargazersForR user repo Nothing
stargazersForR :: Name GithubOwner -> Name Repo -> Maybe Count -> GithubRequest k (Vector GithubOwner)
stargazersForR user repo =
GithubPagedGet ["repos", toPathPart user, toPathPart repo, "stargazers"] []
reposStarredBy :: Maybe GithubAuth -> Name GithubOwner -> IO (Either Error (Vector Repo))
reposStarredBy auth user =
executeRequestMaybe auth $ reposStarredByR user Nothing
reposStarredByR :: Name GithubOwner -> Maybe Count -> GithubRequest k (Vector Repo)
reposStarredByR user =
GithubPagedGet ["users", toPathPart user, "starred"] []
myStarred :: GithubAuth -> IO (Either Error (Vector Repo))
myStarred auth =
executeRequest auth $ myStarredR Nothing
myStarredR :: Maybe Count -> GithubRequest 'True (Vector Repo)
myStarredR = GithubPagedGet ["user", "starred"] []