Giter Club home page Giter Club logo

yelp's People

Contributors

mcschroeder avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yelp's Issues

[PATCH] Update to newer http-conduit

This patch updates yelp bindings to http-conduit 2.0.0.3


diff --git a/Web/Yelp/Base.hs b/Web/Yelp/Base.hs
index 3863331..f1e866e 100644
--- a/Web/Yelp/Base.hs
+++ b/Web/Yelp/Base.hs
@@ -20,6 +20,7 @@ import Data.ByteString (ByteString)
 import Data.Text (Text)
 import Data.Text.Encoding (encodeUtf8)
 import Data.Typeable (Typeable)
+import Data.Default (def)

 import qualified Control.Exception.Lifted as E
 import qualified Data.Aeson as A
@@ -44,9 +45,9 @@ getObject path query =
     runResourceInY $ asJson =<< yhttp =<< yreq path query

 -- | A plain 'H.Request' to a Yelp API.
-yreq :: Monad m => Text -> HT.Query -> YelpT m (H.Request n)
+yreq :: Monad m => Text -> HT.Query -> YelpT m H.Request
 yreq path query = return
-    H.def { H.host = "api.yelp.com"
+    def { H.host = "api.yelp.com"
           , H.path = encodeUtf8 path
           , H.queryString = HT.renderQuery False query
           , H.responseTimeout = Just 120000000 -- 2 minutes
@@ -55,7 +56,7 @@ yreq path query = return
 -- | Same as 'H.http', but takes care of all the boilerplate
 -- (such as signing the request and error handling).
 yhttp :: (MonadBaseControl IO m, C.MonadResource m) => 
-         H.Request m 
+         H.Request
       -> YelpT m (H.Response (C.ResumableSource m ByteString))
 yhttp req = do
     let req' = req { H.checkStatus = \_ _ _ -> Nothing }
diff --git a/yelp.cabal b/yelp.cabal
index 7f3d1c8..5fc3388 100644
--- a/yelp.cabal
+++ b/yelp.cabal
@@ -47,6 +47,7 @@ library
     , transformers-base >= 0.4
     , aeson >= 0.6
     , attoparsec-conduit >= 1.0
+    , data-default
   extensions:
     GeneralizedNewtypeDeriving
     FlexibleInstances

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.