summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangbj <>2016-06-16 08:39:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2016-06-16 08:39:00 (GMT)
commit897cb27ef2fc2e9dd60edc9fadd551b21e9e29fe (patch)
tree2429bedfc5c35750564a0a43a9f207cf84f3176a
parentd2ea4df79b15bef2ceb43381f4ea169713d0a641 (diff)
version 0.1.2.1HEAD0.1.2.1master
-rw-r--r--aur-api.cabal4
-rw-r--r--src/Distribution/ArchLinux/AUR/Types.hs12
2 files changed, 8 insertions, 8 deletions
diff --git a/aur-api.cabal b/aur-api.cabal
index 21b6120..d4b133b 100644
--- a/aur-api.cabal
+++ b/aur-api.cabal
@@ -1,9 +1,9 @@
name: aur-api
-version: 0.1.1.0
+version: 0.1.2.1
synopsis: ArchLinux AUR json v5 API
description: Implements ArchLinux AUR json v5 API defined at:
.
- https://wiki.archlinux.org/index.php/AurJson
+ <https://wiki.archlinux.org/index.php/AurJson>
.
homepage: https://github.com/wangbj/aur-api
license: BSD3
diff --git a/src/Distribution/ArchLinux/AUR/Types.hs b/src/Distribution/ArchLinux/AUR/Types.hs
index d7bcf83..1500091 100644
--- a/src/Distribution/ArchLinux/AUR/Types.hs
+++ b/src/Distribution/ArchLinux/AUR/Types.hs
@@ -79,15 +79,15 @@ data AURInfo = AURInfo {
, packagePackageBaseID :: Int
, packagePackageBase :: Text
, packageVersion :: Text
- , packageDescription :: Text
- , packageURL :: Text
+ , packageDescription :: Maybe Text
+ , packageURL :: Maybe Text
, packageNumVotes :: Int
, packagePopularity :: Double
, packageOutOfDate :: Maybe Int
, packageMaintainer :: Maybe Text
, packageFirstSubmitted :: Int
, packageLastModified :: Int
- , packageURLPath :: Text
+ , packageURLPath :: Maybe Text
, packageDepends :: [Text]
, packageMakeDepends :: [Text]
, packageOptDepends :: [Text]
@@ -103,15 +103,15 @@ instance FromJSON AURInfo where
<*> v .: "PackageBaseID"
<*> v .: "PackageBase"
<*> v .: "Version"
- <*> v .: "Description"
- <*> v .: "URL"
+ <*> v .:? "Description"
+ <*> v .:? "URL"
<*> v .: "NumVotes"
<*> v .: "Popularity"
<*> v .: "OutOfDate"
<*> v .:? "Maintainer"
<*> v .: "FirstSubmitted"
<*> v .: "LastModified"
- <*> v .: "URLPath"
+ <*> v .:? "URLPath"
<*> v .:! "Depends" .!= []
<*> v .:! "MakeDepends" .!= []
<*> v .:! "OptDepends" .!= []