packages feed

factual-api 0.3.1 → 0.3.2

raw patch · 5 files changed

+45/−7 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Factual.Shared.Table: USRestaurants :: Table
+ Data.Factual.Shared.Table: HotelsUS :: Table
+ Data.Factual.Shared.Table: RestaurantsUS :: Table

Files

Data/Factual/Shared/Table.hs view
@@ -9,7 +9,8 @@ -- | This type defines the available tables. Use the Custom table option for --   tables that are not listed you. data Table = Places-           | USRestaurants+           | RestaurantsUS+           | HotelsUS            | Global            | HealthCareProviders            | WorldGeographies@@ -22,7 +23,8 @@ -- Table is a member of the Show typeclass to generate the beginning of the path. instance Show Table where   show Places              = "/t/places"-  show USRestaurants       = "/t/restaurants-us"+  show RestaurantsUS       = "/t/restaurants-us"+  show HotelsUS            = "/t/hotels-us"   show Global              = "/t/global"   show HealthCareProviders = "/t/health-care-providers-us"   show WorldGeographies    = "/t/world-geographies"
Network/Factual/API.hs view
@@ -106,7 +106,7 @@ extractJSON = fromJust . decode . rspPayload  headersList :: [(String, String)]-headersList = [("X-Factual-Lib", "factual-haskell-driver-0.3.1")]+headersList = [("X-Factual-Lib", "factual-haskell-driver-0.3.2")]  basePath :: String basePath = "http://api.v3.factual.com"
README.md view
@@ -31,8 +31,8 @@ can always run the unit tests:      *Main> runUnitTests-    Cases: 41  Tried: 41  Errors: 0  Failures: 0-    Counts {cases = 41, tried = 41, errors = 0, failures = 0}+    Cases: 47  Tried: 47  Errors: 0  Failures: 0+    Counts {cases = 47, tried = 47, errors = 0, failures = 0}     *Main> runIntegrationTests "mykey" "mysecret"     Cases: 10  Tried: 10  Errors: 0  Failures: 0     Counts {cases = 10, tried = 10, errors = 0, failures = 0}
factual-api.cabal view
@@ -1,5 +1,5 @@ name:            factual-api-version:         0.3.1+version:         0.3.2 license:         BSD3 license-file:    LICENSE.txt category:        API, Web
test/Tests.hs view
@@ -20,7 +20,13 @@  unitTests = TestList [ TestLabel "Place table test" placeTablePathTest                      , TestLabel "Restaurants table test" restaurantsTablePathTest+                     , TestLabel "Hotels table test" hotelsTablePathTest                      , TestLabel "Global table test" globalTablePathTest+                     , TestLabel "Healthcare table test" healthcareTablePathTest+                     , TestLabel "World Geographies table test" worldGeographiesTablePathTest+                     , TestLabel "CPG table test" cpgTablePathTest+                     , TestLabel "Crosswalk Products table test" crosswalkProductsTablePathTest+                     , TestLabel "Monetize table test" monetizeTablePathTest                      , TestLabel "Custom table test" customTablePathTest                      , TestLabel "Geopulse test" geopulsePathTest                      , TestLabel "Geocode test" geocodePathTest@@ -79,13 +85,43 @@  restaurantsTablePathTest = TestCase (do   let expected = "/t/restaurants-us?include_count=false"-  let path = toPath $ blankReadQuery { table = USRestaurants }+  let path = toPath $ blankReadQuery { table = RestaurantsUS }   assertEqual "Correct path for us restaurants table" expected path) +hotelsTablePathTest = TestCase (do+  let expected = "/t/hotels-us?include_count=false"+  let path = toPath $ blankReadQuery { table = HotelsUS }+  assertEqual "Correct path for us hotels table" expected path)+ globalTablePathTest = TestCase (do   let expected = "/t/global?include_count=false"   let path = toPath $ blankReadQuery { table = Global }   assertEqual "Correct path for global table" expected path)++healthcareTablePathTest = TestCase (do+  let expected = "/t/health-care-providers-us?include_count=false"+  let path = toPath $ blankReadQuery { table = HealthCareProviders }+  assertEqual "Correct path for health care providers table" expected path)++worldGeographiesTablePathTest = TestCase (do+  let expected = "/t/world-geographies?include_count=false"+  let path = toPath $ blankReadQuery { table = WorldGeographies }+  assertEqual "Correct path for world geographies table" expected path)++cpgTablePathTest = TestCase (do+  let expected = "/t/products-cpg?include_count=false"+  let path = toPath $ blankReadQuery { table = ProductsCPG }+  assertEqual "Correct path for products CPG table" expected path)++crosswalkProductsTablePathTest = TestCase (do+  let expected = "/t/products-crosswalk?include_count=false"+  let path = toPath $ blankReadQuery { table = ProductsCrosswalk }+  assertEqual "Correct path for products crosswalk table" expected path)++monetizeTablePathTest = TestCase (do+  let expected = "/places/monetize?include_count=false"+  let path = toPath $ blankReadQuery { table = Monetize }+  assertEqual "Correct path for monetize table" expected path)  customTablePathTest = TestCase (do   let expected = "/t/foo?include_count=false"