module Github.Users (
userInfoFor
,userInfoFor'
,userInfoForR
,userInfoCurrent'
,userInfoCurrentR
,module Github.Data
) where
import Github.Auth
import Github.Data
import Github.Request
userInfoFor' :: Maybe GithubAuth -> Name GithubOwner -> IO (Either Error GithubOwner)
userInfoFor' auth = executeRequestMaybe auth . userInfoForR
userInfoFor :: Name GithubOwner -> IO (Either Error GithubOwner)
userInfoFor = executeRequest' . userInfoForR
userInfoForR :: Name GithubOwner -> GithubRequest k GithubOwner
userInfoForR userName = GithubGet ["users", toPathPart userName] []
userInfoCurrent' :: Maybe GithubAuth -> IO (Either Error GithubOwner)
userInfoCurrent' auth =
executeRequestMaybe auth . unsafeDropAuthRequirements $ userInfoCurrentR
userInfoCurrentR :: GithubRequest 'True GithubOwner
userInfoCurrentR = GithubGet ["user"] []