github-0.19: 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 :: RW) a where Source #

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.

Instances

Eq a => Eq (Request k a) Source # 

Methods

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

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

Ord a => Ord (Request k a) Source # 

Methods

compare :: Request k a -> Request k a -> Ordering #

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

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

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

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

max :: Request k a -> Request k a -> Request k a #

min :: Request k a -> Request k a -> Request k a #

Show (Request k a) Source # 

Methods

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

show :: Request k a -> String #

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

Hashable (Request k a) Source # 

Methods

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

hash :: Request k a -> Int #

Smart constructors

Auxiliary types

data RW Source #

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 Source # 

Methods

minBound :: RW #

maxBound :: RW #

Enum RW Source # 

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 Source # 

Methods

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

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

Data RW Source # 

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 Source # 

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 Source # 
Show RW Source # 

Methods

showsPrec :: Int -> RW -> ShowS #

show :: RW -> String #

showList :: [RW] -> ShowS #

Generic RW Source # 

Associated Types

type Rep RW :: * -> * #

Methods

from :: RW -> Rep RW x #

to :: Rep RW x -> RW #

type Rep RW Source # 
type Rep RW = D1 * (MetaData "RW" "GitHub.Data.Request" "github-0.19-HK5gGFVL8du3RBT4q9vA87" False) ((:+:) * (C1 * (MetaCons "RO" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "RA" PrefixI False) (U1 *)) (C1 * (MetaCons "RW" PrefixI False) (U1 *))))

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

data FetchCount Source #

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 Source # 
Num FetchCount Source #

This instance is there mostly for fromInteger.

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

Associated Types

type Rep FetchCount :: * -> * #

Hashable FetchCount Source # 
Binary FetchCount Source # 
NFData FetchCount Source # 

Methods

rnf :: FetchCount -> () #

type Rep FetchCount Source # 
type Rep FetchCount = D1 * (MetaData "FetchCount" "GitHub.Data.Request" "github-0.19-HK5gGFVL8du3RBT4q9vA87" False) ((:+:) * (C1 * (MetaCons "FetchAtLeast" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Word))) (C1 * (MetaCons "FetchAll" PrefixI False) (U1 *)))

type Paths = [Text] Source #

class IsPathPart a where Source #

Minimal complete definition

toPathPart

Methods

toPathPart :: a -> Text Source #

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

Request query string

type Count = Int Source #

Count of elements