Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Common functions for the MS Graph API v1.0
https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0&preserve-view=true
Synopsis
- get :: FromJSON a => [Text] -> Option 'Https -> AccessToken -> Req a
- getLbs :: [Text] -> Option 'Https -> AccessToken -> Req ByteString
- post :: (FromJSON b, ToJSON a) => [Text] -> Option 'Https -> a -> AccessToken -> Req b
- runReq :: MonadIO m => HttpConfig -> Req a -> m a
- data Collection a = Collection {
- cValue :: [a]
- aesonOptions :: String -> Options
GET
GET https://graph.microsoft.com/v1.0/...
:: [Text] | URI path segments |
-> Option 'Https | |
-> AccessToken | |
-> Req ByteString |
GET https://graph.microsoft.com/v1.0/...
Returns the response body as a bytestring, e.g. for endpoints that download files or general bytestring payloads
POST
:: (FromJSON b, ToJSON a) | |
=> [Text] | URI path segments |
-> Option 'Https | |
-> a | request body |
-> AccessToken | |
-> Req b |
POST https://graph.microsoft.com/v1.0/...
running requests
:: MonadIO m | |
=> HttpConfig |
|
-> Req a | Computation to run |
-> m a |
Run a computation in the Req
monad with the given HttpConfig
. In
the case of an exceptional situation an HttpException
will be thrown.
Since: req-0.4.0
JSON : aeson helpers
data Collection a Source #
a collection of items with key value
Collection | |
|
Instances
drop the prefix and lowercase first character
e.g. userDisplayName
->
displayName