module GitHub.Endpoints.Organizations (
publicOrganizationsForR,
publicOrganizationR,
organizationsR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
organizationsR :: FetchCount -> Request k (Vector SimpleOrganization)
organizationsR :: forall (k :: RW).
FetchCount -> Request k (Vector SimpleOrganization)
organizationsR = Paths
-> QueryString
-> FetchCount
-> Request k (Vector SimpleOrganization)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"user", Text
"orgs"] []
publicOrganizationsForR :: Name User -> FetchCount -> Request k (Vector SimpleOrganization)
publicOrganizationsForR :: forall (k :: RW).
Name User -> FetchCount -> Request k (Vector SimpleOrganization)
publicOrganizationsForR Name User
user = Paths
-> QueryString
-> FetchCount
-> Request k (Vector SimpleOrganization)
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"users", Name User -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name User
user, Text
"orgs"] []
publicOrganizationR :: Name Organization -> Request k Organization
publicOrganizationR :: forall (k :: RW). Name Organization -> Request k Organization
publicOrganizationR Name Organization
reqOrganizationName = Paths -> QueryString -> Request k Organization
forall (mt :: RW) a. Paths -> QueryString -> Request mt a
query [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
reqOrganizationName] []