rollbar-hs-0.3.1.0: Core Rollbar data types and APIs.

Copyright(c) Hardy Jones 2017
LicenseBSD3
Maintainerjones3.hardy@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Rollbar.API

Contents

Description

Provides functions for communicating with Rollbar through the public API.

See Rollbar's API for more details.

Synopsis

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 #

Sends an Item off to Rollbar.

Creates a new Manager to send off the request.

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 #

Sends an Item off to Rollbar.

Creates a new Manager to send off the request. Makes no claims about what you get back.

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.

Constructors

ItemsPOSTSuccess 

Fields

ItemsPOSTError 

Fields

Instances
Eq ItemsPOSTResponse Source # 
Instance details

Defined in Rollbar.API

Show ItemsPOSTResponse Source # 
Instance details

Defined in Rollbar.API

Generic ItemsPOSTResponse Source # 
Instance details

Defined in Rollbar.API

Associated Types

type Rep ItemsPOSTResponse :: * -> * #

FromJSON ItemsPOSTResponse Source # 
Instance details

Defined in Rollbar.API

type Rep ItemsPOSTResponse Source # 
Instance details

Defined in Rollbar.API

type Rep ItemsPOSTResponse = D1 (MetaData "ItemsPOSTResponse" "Rollbar.API" "rollbar-hs-0.3.1.0-AHXin9WUqD3IOtR3mTqHpy" False) (C1 (MetaCons "ItemsPOSTSuccess" PrefixI True) (S1 (MetaSel (Just "err_ItemsPOSTSuccess") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "result_ItemsPOSTSuccess") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ItemsPOSTSuccessResult)) :+: C1 (MetaCons "ItemsPOSTError" PrefixI True) (S1 (MetaSel (Just "err_ItemsPOSTError") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "message_ItemsPOSTError") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

newtype ItemsPOSTErrorMessage Source #

The human readable error message from sending an Item to Rollbar.

newtype ItemsPOSTSuccessResult Source #

The successful response from sending an Item to Rollbar.

Constructors

ItemsPOSTSuccessResult 

Fields

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.