Copyright | (c) Hardy Jones 2017 |
---|---|
License | BSD3 |
Maintainer | jones3.hardy@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Provides functions for communicating with Rollbar through the public API.
See Rollbar's API for more details.
Synopsis
- itemsPOST :: (MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response (Either JSONException ItemsPOSTResponse))
- itemsPOST' :: (MonadIO f, RemoveHeaders b, ToJSON a) => Manager -> Item a b -> f (Response (Either JSONException ItemsPOSTResponse))
- itemsPOSTRaw :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response (Either JSONException c))
- itemsPOSTRaw' :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Manager -> Item a b -> f (Response (Either JSONException c))
- makeRequest :: (RemoveHeaders headers, ToJSON a) => Item a headers -> Request
- data ItemsPOSTResponse
- newtype ItemsPOSTErrorMessage = ItemsPOSTErrorMessage Text
- newtype ItemsPOSTSuccessResult = ItemsPOSTSuccessResult {}
- itemsPOSTWithException :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response c)
Helpful functions
These functions are probably what you want most of the time.
itemsPOST :: (MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response (Either JSONException ItemsPOSTResponse)) Source #
itemsPOST' :: (MonadIO f, RemoveHeaders b, ToJSON a) => Manager -> Item a b -> f (Response (Either JSONException ItemsPOSTResponse)) Source #
Sends an Item
off to Rollbar.
itemsPOSTRaw :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response (Either JSONException c)) Source #
itemsPOSTRaw' :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Manager -> Item a b -> f (Response (Either JSONException c)) Source #
Sends an Item
off to Rollbar.
Makes no claims about what you get back.
makeRequest :: (RemoveHeaders headers, ToJSON a) => Item a headers -> Request Source #
Converts an item into a request ready to send to Rollbar.
If you need a different scheme for sending items,
you'll probably want to use this along with a function like httpLbs
or httpLbs
.
If you want the JSON back and already have a Manager
,
you can use this function with setRequestManager
.
Then send off the request with something like httpJSONEither
.
Response data types
data ItemsPOSTResponse Source #
The response received from sending an Item
to Rollbar.
ItemsPOSTSuccess | |
| |
ItemsPOSTError | |
|
Instances
newtype ItemsPOSTErrorMessage Source #
The human readable error message from sending an Item
to Rollbar.
Instances
newtype ItemsPOSTSuccessResult Source #
The successful response from sending an Item
to Rollbar.
Instances
Eq ItemsPOSTSuccessResult Source # | |
Defined in Rollbar.API | |
Show ItemsPOSTSuccessResult Source # | |
Defined in Rollbar.API showsPrec :: Int -> ItemsPOSTSuccessResult -> ShowS # show :: ItemsPOSTSuccessResult -> String # showList :: [ItemsPOSTSuccessResult] -> ShowS # | |
Generic ItemsPOSTSuccessResult Source # | |
Defined in Rollbar.API type Rep ItemsPOSTSuccessResult :: * -> * # | |
FromJSON ItemsPOSTSuccessResult Source # | |
Defined in Rollbar.API | |
type Rep ItemsPOSTSuccessResult Source # | |
Defined in Rollbar.API type Rep ItemsPOSTSuccessResult = D1 (MetaData "ItemsPOSTSuccessResult" "Rollbar.API" "rollbar-hs-0.3.1.0-AHXin9WUqD3IOtR3mTqHpy" True) (C1 (MetaCons "ItemsPOSTSuccessResult" PrefixI True) (S1 (MetaSel (Just "uuid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID4))) |
Impure functions
Use with caution.
itemsPOSTWithException :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response c) Source #
Sends an Item
off to Rollbar.
Creates a new Manager
to send off the request.
Makes no claims about what you get back.
Throws a JSONException
if it cannot parse the response.
Yes, this name is annoying, so are exceptions.