packages feed

googleplus 0.2.1 → 0.2.2

raw patch · 3 files changed

+17/−5 lines, 3 files

Files

README view
@@ -38,3 +38,15 @@     main = do       runReaderT (unGooglePlusM doStuff) env       where env  = GooglePlusEnv { gpAuth = APIKey "MYKEY" }++Bugs+----+Use the issue tracker on github for bugs. I'll do my best to get them resolved+as soon as I can. One thing you may encounter is a parse error (resulting in a+Left value) in some of the API calls talking about a key missing. I've tried to+weed these out as much as possible but this is a result of Google not+explicitly specifying what fields will always be present. I've had to just feed+live data through the code to figure out what fields aren't always there. This,+consequently, is why there are so many Maybe fields in the datatypes. If you+spot one of these parse errors, please tell me right away so I can correct the+types.
Web/GooglePlus/Types.hs view
@@ -417,14 +417,14 @@   parseJSON v                = typeMismatch "EmailType" v  -- |External URLS that the Person has published-data PersonURL = PersonURL { personUrlPrimary :: Bool,          -- ^ Whether or not the URL is the Person's primary URl-                             personUrlType    :: PersonURLType, -- ^ Type of URL-                             personURLValue   :: URL            -- ^ Actual text URl for the Person+data PersonURL = PersonURL { personUrlPrimary :: Bool,                -- ^ Whether or not the URL is the Person's primary URl+                             personUrlType    :: Maybe PersonURLType, -- ^ Type of URL+                             personURLValue   :: URL                  -- ^ Actual text URl for the Person                              } deriving (Show, Eq)  instance FromJSON PersonURL where   parseJSON (Object v) = PersonURL <$> v .:| ("primary", False)-                                   <*> v .:  "type"+                                   <*> v .:? "type"                                    <*> v .:  "value"   parseJSON v          = typeMismatch "PersonURL" v 
googleplus.cabal view
@@ -1,5 +1,5 @@ name: googleplus-version: 0.2.1+version: 0.2.2 synopsis: Haskell implementation of the Google+ API description:    Will implement the Google+ REST API. Google+ is a social network made by