avers-api 0.0.4 → 0.0.5
raw patch · 4 files changed
+12/−11 lines, 4 filesdep +http-api-data
Dependencies added: http-api-data
Files
- avers-api.cabal +2/−1
- src/Avers/API/Credentials.hs +1/−1
- src/Avers/API/Instances.hs +7/−7
- src/Avers/API/Types.hs +2/−2
avers-api.cabal view
@@ -1,5 +1,5 @@ name: avers-api-version: 0.0.4+version: 0.0.5 synopsis: Types describing the core and extended Avers APIs description: See README homepage: http://github.com/wereHamster/avers-api@@ -35,6 +35,7 @@ , avers , bytestring , cookie+ , http-api-data , servant , text , time
src/Avers/API/Credentials.hs view
@@ -14,4 +14,4 @@ data Credentials = SessionIdCredential !SessionId- -- | AccessTokenCredential !AccessToken+ -- AccessTokenCredential !AccessToken
src/Avers/API/Instances.hs view
@@ -4,15 +4,15 @@ import Avers-import Servant.API (FromText(..))+import Web.HttpApiData (FromHttpApiData(..)) -instance FromText ObjId where- fromText = Just . ObjId+instance FromHttpApiData ObjId where+ parseUrlPiece = Right . ObjId -instance FromText RevId where- fromText x = fromText x >>= Just . RevId+instance FromHttpApiData RevId where+ parseUrlPiece x = parseUrlPiece x >>= Right . RevId -instance FromText BlobId where- fromText x = fromText x >>= Just . BlobId+instance FromHttpApiData BlobId where+ parseUrlPiece = Right . BlobId
src/Avers/API/Types.hs view
@@ -117,8 +117,8 @@ -- ^ A new patch was created. deriving (Generic) - -- | LatestReleaseNotification !Release- -- ^ A new release was created.+ -- LatestReleaseNotification !Release+ -- A new release was created. instance ToJSON ObjectChangeNotification where toJSON (PatchNotification p) = object [ "type" .= ("patch" :: Text), "content" .= p ]