packages feed

github-types 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+32/−3 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- GitHub.Types.Base: repositoryOwnerName :: Repository -> Text
+ GitHub.Types.Base: Owner :: Int -> Text -> Text -> Text -> Owner
+ GitHub.Types.Base: data Owner
+ GitHub.Types.Base: instance Eq Owner
+ GitHub.Types.Base: instance FromJSON Owner
+ GitHub.Types.Base: instance Show Owner
+ GitHub.Types.Base: ownerId :: Owner -> Int
+ GitHub.Types.Base: ownerLogin :: Owner -> Text
+ GitHub.Types.Base: ownerName :: Owner -> Text
+ GitHub.Types.Base: ownerType :: Owner -> Text
+ GitHub.Types.Base: repositoryFullName :: Repository -> Text
+ GitHub.Types.Base: repositoryId :: Repository -> Int
+ GitHub.Types.Base: repositoryOwner :: Repository -> Owner
+ GitHub.Types.Events: deploymentStatusEventRepository :: DeploymentStatusEvent -> Repository
- GitHub.Types.Base: Repository :: Text -> Text -> Repository
+ GitHub.Types.Base: Repository :: Int -> Text -> Text -> Owner -> Repository
- GitHub.Types.Events: DeploymentStatusEvent :: State -> Maybe Text -> Deployment -> Maybe Text -> DeploymentStatusEvent
+ GitHub.Types.Events: DeploymentStatusEvent :: State -> Maybe Text -> Deployment -> Maybe Text -> Repository -> DeploymentStatusEvent

Files

github-types.cabal view
@@ -1,5 +1,5 @@ name:                github-types-version:             0.1.0.1+version:             0.1.0.2 license:             OtherLicense license-file:        LICENSE author:              Tomas Carnecky
src/GitHub/Types/Base.hs view
@@ -12,18 +12,44 @@   ------------------------------------------------------------------------------+-- Owner++data Owner = Owner+    { ownerId        :: Int+    , ownerLogin     :: Text+    , ownerName      :: Text+    , ownerType      :: Text+    } deriving (Eq, Show)+++instance FromJSON Owner where+    parseJSON (Object x) = Owner+        <$> x .: "id"+        <*> x .: "login"+        <*> x .: "name"+        <*> x .: "type"++    parseJSON _ = mzero++++------------------------------------------------------------------------------ -- Repository  data Repository = Repository-    { repositoryOwnerName :: Text+    { repositoryId        :: Int     , repositoryName      :: Text+    , repositoryFullName  :: Text+    , repositoryOwner     :: Owner     } deriving (Eq, Show)   instance FromJSON Repository where     parseJSON (Object x) = Repository-        <$> (x .: "owner" >>= (.: "login"))+        <$> x .: "id"         <*> x .: "name"+        <*> x .: "full_name"+        <*> x .: "owner"      parseJSON _ = mzero 
src/GitHub/Types/Events.hs view
@@ -96,6 +96,8 @@       -- ^ The deployment that this status is associated with.     , deploymentStatusEventDescription :: Maybe Text       -- ^ The optional human-readable description added to the status.+    , deploymentStatusEventRepository  :: Repository+      -- ^ The repository for which the deployment was created (UNDOCUMENTED).     } deriving (Eq, Show)  instance FromJSON DeploymentStatusEvent where@@ -104,5 +106,6 @@         <*> x .: "target_url"         <*> x .: "deployment"         <*> x .: "description"+        <*> x .: "repository"      parseJSON _ = mzero