factual-api 0.3.2 → 0.3.3
raw patch · 3 files changed
+42/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Network.Factual.API: debugQuery :: Query query => query -> IO ()
+ Network.Factual.API: debugWrite :: Write write => write -> IO ()
Files
- Network/Factual/API.hs +16/−1
- README.md +25/−0
- factual-api.cabal +1/−1
Network/Factual/API.hs view
@@ -10,6 +10,9 @@ , makeMultiRequest -- * Write functions , sendWrite+ -- * Debug functions+ , debugQuery+ , debugWrite -- * The hoauth Token type , Token(..) ) where@@ -69,6 +72,18 @@ let request = generatePostRequest fullpath (body write) makeRequest' token request +-- | This function takes a query and prints out the path for debugging purposes+debugQuery :: (Query query) => query -> IO ()+debugQuery query = putStrLn ("Query path: " ++ basePath ++ toPath query)++-- | This function takes a write and prints out the path and body for debugging+-- purposes.+debugWrite :: (Write write) => write -> IO ()+debugWrite write = do+ putStrLn ("Write path: " ++ basePath ++ path write)+ putStrLn "Write body:"+ putStrLn $ body write+ -- The following helper functions aid the exported API functions makeRawRequest' :: Token -> String -> IO Response makeRawRequest' token queryString = do@@ -106,7 +121,7 @@ extractJSON = fromJust . decode . rspPayload headersList :: [(String, String)]-headersList = [("X-Factual-Lib", "factual-haskell-driver-0.3.2")]+headersList = [("X-Factual-Lib", "factual-haskell-driver-0.3.3")] basePath :: String basePath = "http://api.v3.factual.com"
README.md view
@@ -2,6 +2,31 @@ This is a Haskell driver for [Factual's public API](http://developer.factual.com/display/docs/Factual+Developer+APIs+Version+3). +# Features++* Read Queries+ * Places US+ * Restaurants US+ * Hotels US+ * Global Places+ * Healthcare Providers+ * World Geographies+ * Products CPG+ * Products Crosswalk+ * Monetize+ * Custom Tables+* Crosswalk Queries+* Facets Queries+* Geocode Queries+* Geopulse Queries+* Resolve Queries+* Schema Queries+* Multi Queries+* Raw Read Queries+* Parametric Search+* Geo Filters+* Query Debugging+ # Installation ## Prerequisites
factual-api.cabal view
@@ -1,5 +1,5 @@ name: factual-api-version: 0.3.2+version: 0.3.3 license: BSD3 license-file: LICENSE.txt category: API, Web