github-0.16.0: Access to the GitHub API, v3.

LicenseBSD-3-Clause
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

GitHub.Data.Request

Contents

Description

 

Synopsis

Request

data Request k a where #

Github request data type.

  • k describes whether authentication is required. It's required for non-GET requests.
  • a is the result type

Note: Request is not Functor on purpose.

Constructors

SimpleQuery :: FromJSON a => SimpleRequest k a -> Request k a 
StatusQuery :: StatusMap a -> SimpleRequest k () -> Request k a 
HeaderQuery :: FromJSON a => RequestHeaders -> SimpleRequest k a -> Request k a 

Instances

Eq a => Eq (Request k a) # 

Methods

(==) :: Request k a -> Request k a -> Bool #

(/=) :: Request k a -> Request k a -> Bool #

Show (Request k a) # 

Methods

showsPrec :: Int -> Request k a -> ShowS #

show :: Request k a -> String #

showList :: [Request k a] -> ShowS #

Hashable (Request k a) # 

Methods

hashWithSalt :: Int -> Request k a -> Int #

hash :: Request k a -> Int #

data SimpleRequest k a where #

Instances

Eq a => Eq (SimpleRequest k a) # 

Methods

(==) :: SimpleRequest k a -> SimpleRequest k a -> Bool #

(/=) :: SimpleRequest k a -> SimpleRequest k a -> Bool #

Show (SimpleRequest k a) # 
Hashable (SimpleRequest k a) # 

Methods

hashWithSalt :: Int -> SimpleRequest k a -> Int #

hash :: SimpleRequest k a -> Int #

Smart constructors

Auxiliary types

data RW #

Type used as with DataKinds to tag whether requests need authentication or aren't read-only.

Constructors

RO

Read-only, doesn't necessarily requires authentication

RA

Read autenticated

RW

Read-write, requires authentication

Instances

Bounded RW # 

Methods

minBound :: RW #

maxBound :: RW #

Enum RW # 

Methods

succ :: RW -> RW #

pred :: RW -> RW #

toEnum :: Int -> RW #

fromEnum :: RW -> Int #

enumFrom :: RW -> [RW] #

enumFromThen :: RW -> RW -> [RW] #

enumFromTo :: RW -> RW -> [RW] #

enumFromThenTo :: RW -> RW -> RW -> [RW] #

Eq RW # 

Methods

(==) :: RW -> RW -> Bool #

(/=) :: RW -> RW -> Bool #

Data RW # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RW -> c RW #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RW #

toConstr :: RW -> Constr #

dataTypeOf :: RW -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c RW) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RW) #

gmapT :: (forall b. Data b => b -> b) -> RW -> RW #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RW -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RW -> r #

gmapQ :: (forall d. Data d => d -> u) -> RW -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RW -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RW -> m RW #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RW -> m RW #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RW -> m RW #

Ord RW # 

Methods

compare :: RW -> RW -> Ordering #

(<) :: RW -> RW -> Bool #

(<=) :: RW -> RW -> Bool #

(>) :: RW -> RW -> Bool #

(>=) :: RW -> RW -> Bool #

max :: RW -> RW -> RW #

min :: RW -> RW -> RW #

Read RW # 
Show RW # 

Methods

showsPrec :: Int -> RW -> ShowS #

show :: RW -> String #

showList :: [RW] -> ShowS #

Generic RW # 

Associated Types

type Rep RW :: * -> * #

Methods

from :: RW -> Rep RW x #

to :: Rep RW x -> RW #

type Rep RW # 
type Rep RW = D1 (MetaData "RW" "GitHub.Data.Request" "github-0.16.0-1eEADOe6VzR9O6v5ijkXoG" False) ((:+:) (C1 (MetaCons "RO" PrefixI False) U1) ((:+:) (C1 (MetaCons "RA" PrefixI False) U1) (C1 (MetaCons "RW" PrefixI False) U1)))

type StatusMap a = [(Int, a)] #

data CommandMethod a where #

Http method of requests with body.

data FetchCount #

PagedQuery returns just some results, using this data we can specify how many pages we want to fetch.

Constructors

FetchAtLeast !Word 
FetchAll 

Instances

Eq FetchCount # 
Num FetchCount #

This instance is there mostly for fromInteger.

Ord FetchCount # 
Read FetchCount # 
Show FetchCount # 
Generic FetchCount # 

Associated Types

type Rep FetchCount :: * -> * #

Hashable FetchCount # 
Binary FetchCount # 
NFData FetchCount # 

Methods

rnf :: FetchCount -> () #

type Rep FetchCount # 
type Rep FetchCount = D1 (MetaData "FetchCount" "GitHub.Data.Request" "github-0.16.0-1eEADOe6VzR9O6v5ijkXoG" False) ((:+:) (C1 (MetaCons "FetchAtLeast" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word))) (C1 (MetaCons "FetchAll" PrefixI False) U1))

type Paths = [Text] #

class IsPathPart a where #

Minimal complete definition

toPathPart

Methods

toPathPart :: a -> Text #

Instances

IsPathPart (Name a) # 

Methods

toPathPart :: Name a -> Text #

IsPathPart (Id a) # 

Methods

toPathPart :: Id a -> Text #

type QueryString = [(ByteString, Maybe ByteString)] #

Request query string

type Count = Int #

Count of elements