packages feed

hissmetrics 0.2.1 → 0.2.2

raw patch · 2 files changed

+18/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Web.KISSmetrics: generateTimestamp :: IO Timestamp
+ Web.KISSmetrics: instance (Eq event, Eq ident) => Eq (CallType event ident)
+ Web.KISSmetrics: instance (Ord event, Ord ident) => Ord (CallType event ident)
+ Web.KISSmetrics: instance (Read event, Read ident) => Read (CallType event ident)
+ Web.KISSmetrics: instance (Show event, Show ident) => Show (CallType event ident)
+ Web.KISSmetrics: instance Eq Timestamp
+ Web.KISSmetrics: instance Ord Timestamp
+ Web.KISSmetrics: instance Read Timestamp
+ Web.KISSmetrics: instance Show Timestamp
+ Web.KISSmetrics: instance Typeable Timestamp
+ Web.KISSmetrics: instance Typeable2 CallType

Files

hissmetrics.cabal view
@@ -1,5 +1,5 @@ Name:                hissmetrics-Version:             0.2.1+Version:             0.2.2 Synopsis:            Unofficial API bindings to KISSmetrics. Homepage:            https://github.com/meteficha/hissmetrics License:             BSD3@@ -32,5 +32,7 @@                  , http-types                  , http-conduit == 1.4.*   Extensions:+    DeriveDataTypeable,     RecordWildCards,     OverloadedStrings+  GHC-options: -Wall
src/Web/KISSmetrics.hs view
@@ -9,6 +9,7 @@     , SimpleText     , Property     , Timestamp(..)+    , generateTimestamp       -- * Making calls     , call     , CallType(..)@@ -17,13 +18,14 @@     , Identity(..)     ) where +import Control.Applicative ((<$>)) import Control.Arrow (second) import Data.Text (Text)-import Data.Time (UTCTime, formatTime)+import Data.Time (UTCTime, formatTime, getCurrentTime)+import Data.Typeable (Typeable) import qualified Data.ByteString.Char8 as B8 import qualified Data.Conduit as C import qualified Data.Conduit.List as CL-import qualified Data.Text as T import qualified Data.Text.Encoding as TE import qualified Network.HTTP.Conduit as H import qualified Network.HTTP.Types as H@@ -52,9 +54,18 @@     Automatic     -- ^ Use KISSmetrics' servers time as the timestamp.   | Manual UTCTime-    -- ^ Use given time as the timestamp.+    -- ^ Use given time as the timestamp.  If possible, use+    -- 'Manual' since it allows you to safely resend events that+    -- appear to have failed without being afraid of duplicates.+    -- See also 'generateTimestamp'.+    deriving (Eq, Ord, Show, Read, Typeable)  +-- | Generate a 'Manual' timestamp with the current time.+generateTimestamp :: IO Timestamp+generateTimestamp = Manual <$> getCurrentTime++ -- | A type of call that may be made to KISSmetrics.  See also -- <http://support.kissmetrics.com/apis/specifications>. data CallType event ident =@@ -83,6 +94,7 @@           , identity' :: ident             -- ^ Other identity you want to alias.           }+    deriving (Eq, Ord, Show, Read, Typeable)   -- | Type class of data types that are event names.