hgithub-0.1.0: Haskell bindings to the GitHub API

PortabilityGHC
Stabilityexperimental
Maintainerthu@hypered.be
Safe HaskellSafe-Infered

Network.GitHub

Description

This module provides bindings to the GitHub API v3.

Synopsis

Documentation

apiGetRequest :: ByteString -> String -> [(CI ByteString, ByteString)] -> IO (Request IO)Source

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.

apiPostRequest :: ByteString -> String -> ByteString -> IO (Request IO)Source

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.

apiGet :: FromJSON a => String -> String -> [(CI ByteString, ByteString)] -> IO (Maybe a)Source

Execute a GET agains the specified URI (e.g. `/user/repos`) using the supplied `username:password` and parameters.

apiPost :: FromJSON a => String -> String -> ByteString -> IO (Maybe a)Source

Execute a POST agains the specified URI (e.g. `/user/repos`) using the supplied `username:password` and body.

repositoryList :: String -> IO (Maybe [Repository])Source

Return the list of repositories for a given `username:password` string.

repositoryCreate :: String -> String -> Maybe String -> IO (Maybe Repository)Source

Create a new repository from a given name and description.

data Repository Source

Represent a repository. TODO add missing fields.

data CreateRepository Source

Data needed to create a new repository.