Description
Bindings to GitHub API using servant.
Description
This package provides a servant-client based client for accessing the GitHub API v3.
The github client is provided through the Network.GitHub.GitHub
monad, which provides support for managing the user-agent (a requirement for github), an authentication token, and, pagination support when the resulting value is a list.
import System.Environment
import Data.String
import Network.GitHub
main = do
token <- fmap fromString <$> lookupEnv "GITHUB_TOKEN"
result <- runGitHub userOrganisations token
case result of
Left e -> print e
Right orgs -> mapM_ print orgs