hissmetrics 0.2 → 0.2.1
raw patch · 2 files changed
+11/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hissmetrics.cabal +1/−1
- src/Web/KISSmetrics.hs +10/−7
hissmetrics.cabal view
@@ -1,5 +1,5 @@ Name: hissmetrics-Version: 0.2+Version: 0.2.1 Synopsis: Unofficial API bindings to KISSmetrics. Homepage: https://github.com/meteficha/hissmetrics License: BSD3
src/Web/KISSmetrics.hs view
@@ -114,6 +114,12 @@ -- | Call KISSmetrics' API. See 'CallType' for documentation -- about which calls you may make. --+-- KISSmetrics does not return errors even when an error occurs+-- and there's absolutely no way of knowing if your request went+-- through. However, this function /may/ throw an exception if+-- we fail to make the request to KISSmetrics (e.g. if there's a+-- problem with your server's Internet connection).+-- -- Note that official KISSmetrics' APIs provide many functions -- (usually four) while we provide just this one and a sum data -- type. This function alone does the work of @record@, @set@,@@ -134,6 +140,7 @@ H.def { H.method = "GET" , H.secure = True , H.host = "trk.kissmetrics.com"+ , H.port = 443 , H.path = path , H.queryString = H.renderSimpleQuery False $@@ -144,14 +151,10 @@ -- Make the call H.Response {..} <- H.http request manager - -- By default http-conduit will already throw an exception on- -- anything other than 200 Ok, so we don't need to check the- -- response. We consume it just to free the resources as early- -- as possible. (If we just closed and KISSmetrics decided to- -- give an OK message in the body, the connection would not be- -- keep-alived correctly.)+ -- KISSmetrics always returns 200 Ok with an invisible 1x1+ -- GIF. We need to consume the body in order to let the+ -- connection be reused via keep-alive. responseBody C.$$ CL.sinkNull- -- | Internal function. Given a 'CallType', return the URL to be