Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data GithubRequest k a where
- GithubGet :: FromJSON a => Paths -> QueryString -> GithubRequest k a
- GithubPagedGet :: FromJSON (Vector a) => Paths -> QueryString -> Maybe Count -> GithubRequest k (Vector a)
- GithubPost :: FromJSON a => PostMethod -> Paths -> ByteString -> GithubRequest True a
- GithubDelete :: Paths -> GithubRequest True ()
- GithubStatus :: GithubRequest k () -> GithubRequest k Status
- data PostMethod
- toMethod :: PostMethod -> Method
- type Paths = [String]
- class IsPathPart a where
- toPathPart :: a -> String
- type QueryString = [(ByteString, Maybe ByteString)]
- type Count = Int
Documentation
data GithubRequest k 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: GithubRequest
is not Functor
on purpose.
TODO: Add constructor for collection fetches.
GithubGet :: FromJSON a => Paths -> QueryString -> GithubRequest k a | |
GithubPagedGet :: FromJSON (Vector a) => Paths -> QueryString -> Maybe Count -> GithubRequest k (Vector a) | |
GithubPost :: FromJSON a => PostMethod -> Paths -> ByteString -> GithubRequest True a | |
GithubDelete :: Paths -> GithubRequest True () | |
GithubStatus :: GithubRequest k () -> GithubRequest k Status |
Eq (GithubRequest k a) Source | |
Show (GithubRequest k a) Source |
data PostMethod Source
Http method of requests with body.
toMethod :: PostMethod -> Method Source
class IsPathPart a where Source
toPathPart :: a -> String Source
IsPathPart (Name a) Source | |
IsPathPart (Id a) Source |
type QueryString = [(ByteString, Maybe ByteString)] Source