From 6a48654a54860f9a43fa18663e58ee5b7b675ae2 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: May 15 2016 23:04:14 +0000 Subject: Stuff I never committed from long ago Signed-off-by: Ricky Elrod --- diff --git a/src/Web/Pagure/Types.hs b/src/Web/Pagure/Types.hs index e64693a..4e2fd11 100644 --- a/src/Web/Pagure/Types.hs +++ b/src/Web/Pagure/Types.hs @@ -9,6 +9,11 @@ -- Portability : ghc (lens) -- -- Types used within the Pagure API. +-- +-- Endpoint-specific types are found in the other Web.Pagure.Types.* modules. +-- +-- This module contains the types to configure and use pagure-haskell, along +-- with types that are shared across multiple endpoints. ---------------------------------------------------------------------------- module Web.Pagure.Types where diff --git a/src/Web/Pagure/Types/Issue.hs b/src/Web/Pagure/Types/Issue.hs index 04112be..fb66dac 100644 --- a/src/Web/Pagure/Types/Issue.hs +++ b/src/Web/Pagure/Types/Issue.hs @@ -23,6 +23,7 @@ import Prelude -- | Response type for the 'Web.Pagure.Projects.issues' function. data IssueResponse = IssueResponse { issueResponseArgs :: IssueArgs + , issueResponseTotalIssues :: Integer , issueResponseIssueList :: [Issue] } deriving (Eq, Show) @@ -63,6 +64,7 @@ data IssueComment = instance FromJSON IssueResponse where parseJSON (Object x) = IssueResponse <$> x .: "args" + <*> x .: "total_issues" <*> x .: "issues" parseJSON _ = mzero