module GitHub.Endpoints.Users.Followers (
usersFollowing,
usersFollowedBy,
usersFollowingR,
usersFollowedByR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import GitHub.Request
import Prelude ()
usersFollowing :: Name User -> IO (Either Error (Vector SimpleUser))
usersFollowing :: Name User -> IO (Either Error (Vector SimpleUser))
usersFollowing user :: Name User
user =
GenRequest 'MtJSON 'RO (Vector SimpleUser)
-> IO (Either Error (Vector SimpleUser))
forall (mt :: MediaType *) a.
ParseResponse mt a =>
GenRequest mt 'RO a -> IO (Either Error a)
executeRequest' (GenRequest 'MtJSON 'RO (Vector SimpleUser)
-> IO (Either Error (Vector SimpleUser)))
-> GenRequest 'MtJSON 'RO (Vector SimpleUser)
-> IO (Either Error (Vector SimpleUser))
forall a b. (a -> b) -> a -> b
$ Name User
-> FetchCount -> GenRequest 'MtJSON 'RO (Vector SimpleUser)
forall (k :: RW).
Name User -> FetchCount -> Request k (Vector SimpleUser)
usersFollowingR Name User
user FetchCount
FetchAll
usersFollowingR :: Name User -> FetchCount -> Request k (Vector SimpleUser)
usersFollowingR :: Name User -> FetchCount -> Request k (Vector SimpleUser)
usersFollowingR user :: Name User
user =
Paths -> QueryString -> FetchCount -> Request k (Vector SimpleUser)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery ["users", Name User -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name User
user, "followers"] []
usersFollowedBy :: Name User -> IO (Either Error (Vector SimpleUser))
usersFollowedBy :: Name User -> IO (Either Error (Vector SimpleUser))
usersFollowedBy user :: Name User
user =
GenRequest 'MtJSON 'RO (Vector SimpleUser)
-> IO (Either Error (Vector SimpleUser))
forall (mt :: MediaType *) a.
ParseResponse mt a =>
GenRequest mt 'RO a -> IO (Either Error a)
executeRequest' (GenRequest 'MtJSON 'RO (Vector SimpleUser)
-> IO (Either Error (Vector SimpleUser)))
-> GenRequest 'MtJSON 'RO (Vector SimpleUser)
-> IO (Either Error (Vector SimpleUser))
forall a b. (a -> b) -> a -> b
$ Name User
-> FetchCount -> GenRequest 'MtJSON 'RO (Vector SimpleUser)
forall (k :: RW).
Name User -> FetchCount -> Request k (Vector SimpleUser)
usersFollowedByR Name User
user FetchCount
FetchAll
usersFollowedByR :: Name User -> FetchCount -> Request k (Vector SimpleUser)
usersFollowedByR :: Name User -> FetchCount -> Request k (Vector SimpleUser)
usersFollowedByR user :: Name User
user =
Paths -> QueryString -> FetchCount -> Request k (Vector SimpleUser)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery ["users", Name User -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name User
user, "following"] []