Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
MSAzureAPI.Internal.Common
Contents
Description
Common functions for the MS Azure API
Synopsis
- data APIPlane
- get :: FromJSON b => APIPlane -> [Text] -> Option 'Https -> AccessToken -> Req b
- getBs :: APIPlane -> [Text] -> Option 'Https -> AccessToken -> Req ByteString
- getLbs :: APIPlane -> [Text] -> Option 'Https -> AccessToken -> Req ByteString
- post :: (FromJSON b, ToJSON a) => APIPlane -> [Text] -> Option 'Https -> a -> AccessToken -> Req b
- (==:) :: Text -> Text -> Option 'Https
- tryReq :: Req a -> Req (Either HttpException a)
- data Collection a
- aesonOptions :: String -> Options
Documentation
API control planes
Constructors
APManagement | Management plane ( |
APData Text | Data plane e.g. FileREST API |
Arguments
:: FromJSON b | |
=> APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> AccessToken | |
-> Req b |
GET
Arguments
:: APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> AccessToken | |
-> Req ByteString |
GET
a ByteString
e.g. a file
Arguments
:: APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> AccessToken | |
-> Req ByteString |
GET
a ByteString
e.g. a file
Arguments
:: (FromJSON b, ToJSON a) | |
=> APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> a | request body |
-> AccessToken | |
-> Req b |
POST
URL parameters
Helpers
tryReq :: Req a -> Req (Either HttpException a) Source #
Specialized version of try
to HttpException
s
This can be used to catch exceptions of composite Req
statements, e.g. around a do
block
JSON
data Collection a Source #
a collection of items with key value
Instances
FromJSON a => FromJSON (Collection a) Source # | |
Defined in MSAzureAPI.Internal.Common Methods parseJSON :: Value -> Parser (Collection a) # parseJSONList :: Value -> Parser [Collection a] # | |
Generic (Collection a) Source # | |
Defined in MSAzureAPI.Internal.Common Associated Types type Rep (Collection a) :: Type -> Type # | |
Show a => Show (Collection a) Source # | |
Defined in MSAzureAPI.Internal.Common Methods showsPrec :: Int -> Collection a -> ShowS # show :: Collection a -> String # showList :: [Collection a] -> ShowS # | |
Eq a => Eq (Collection a) Source # | |
Defined in MSAzureAPI.Internal.Common | |
type Rep (Collection a) Source # | |
Defined in MSAzureAPI.Internal.Common type Rep (Collection a) = D1 ('MetaData "Collection" "MSAzureAPI.Internal.Common" "ms-azure-api-0.2.0.1-IP4919aq3lA2aGI1SaXxqE" 'False) (C1 ('MetaCons "Collection" 'PrefixI 'True) (S1 ('MetaSel ('Just "cValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))) |
drop the prefix and lowercase first character
e.g. userDisplayName
->
displayName