@@ -56,10 +56,17 @@ data ContentInfo = ContentInfo {
5656instance NFData ContentInfo where rnf = genericRnf
5757instance Binary ContentInfo
5858
59+ data ContentResultInfo = ContentResultInfo
60+ { contentResultInfo :: ! ContentInfo
61+ , contentResultSize :: ! Int
62+ } deriving (Show , Data , Typeable , Eq , Ord , Generic )
63+
64+ instance NFData ContentResultInfo where rnf = genericRnf
65+ instance Binary ContentResultInfo
66+
5967data ContentResult = ContentResult
60- { contentResultInfo :: ! ContentInfo
61- , contentResultSize :: ! Int
62- , contentResultCommit :: ! Commit
68+ { contentResultContent :: ! ContentResultInfo
69+ , contentResultCommit :: ! GitCommit
6370 } deriving (Show , Data , Typeable , Eq , Ord , Generic )
6471
6572instance NFData ContentResult where rnf = genericRnf
@@ -147,10 +154,14 @@ instance FromJSON ContentInfo where
147154 <*> o .: " git_url"
148155 <*> o .: " html_url"
149156
157+ instance FromJSON ContentResultInfo where
158+ parseJSON = withObject " ContentResultInfo" $ \ o ->
159+ ContentResultInfo <$> parseJSON (Object o)
160+ <*> o .: " size"
161+
150162instance FromJSON ContentResult where
151163 parseJSON = withObject " ContentResult" $ \ o ->
152- ContentResult <$> parseJSON (Object o)
153- <*> o .: " size"
164+ ContentResult <$> o .: " content"
154165 <*> o .: " commit"
155166
156167instance ToJSON Author where
0 commit comments