-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Haskell bindings to the GitHub API
--
-- Haskell bindings to the GitHub API
@package hgithub
@version 0.1.0
-- | This module provides bindings to the GitHub API v3.
module Network.GitHub
-- | Construct a request from a `username:password` bytestring (suitable
-- for a Basic Auth scheme), a URI (starting with a /, e.g.
-- `/user/repos`), and a list of parameters.
apiGetRequest :: ByteString -> String -> [(CI ByteString, ByteString)] -> IO (Request IO)
-- | Construct a request from a `username:password` bytestring (suitable
-- for a Basic Auth scheme), a URI (starting with a /, e.g.
-- `/user/repos`), and a body.
apiPostRequest :: ByteString -> String -> ByteString -> IO (Request IO)
-- | Execute a GET agains the specified URI (e.g. `/user/repos`) using the
-- supplied `username:password` and parameters.
apiGet :: FromJSON a => String -> String -> [(CI ByteString, ByteString)] -> IO (Maybe a)
-- | Execute a POST agains the specified URI (e.g. `/user/repos`) using the
-- supplied `username:password` and body.
apiPost :: FromJSON a => String -> String -> ByteString -> IO (Maybe a)
-- | Return the list of repositories for a given `username:password`
-- string.
repositoryList :: String -> IO (Maybe [Repository])
-- | Create a new repository from a given name and description.
repositoryCreate :: String -> String -> Maybe String -> IO (Maybe Repository)
-- | Represent a repository. TODO add missing fields.
data Repository
Repository :: Text -> Text -> Repository
repositoryName :: Repository -> Text
repositoryDescription :: Repository -> Text
-- | Data needed to create a new repository.
data CreateRepository
CreateRepository :: Text -> Maybe Text -> CreateRepository
createRepositoryName :: CreateRepository -> Text
createRepositoryDescription :: CreateRepository -> Maybe Text
instance Show Repository
instance Show CreateRepository
instance ToJSON CreateRepository
instance FromJSON Repository