{-# LANGUAGE OverloadedStrings   #-}
{-# LANGUAGE CPP                 #-}

module Distribution.Fedora.Products
  (getProducts)
where

import Data.Aeson (Object)
import Fedora.PDC (makeKey, pdcProductVersions)
import System.Cached.JSON

getProducts :: IO [Object]
getProducts :: IO [Object]
getProducts =
  String -> String -> IO [Object] -> NominalDiffTime -> IO [Object]
forall a.
(FromJSON a, ToJSON a) =>
String -> String -> IO a -> NominalDiffTime -> IO a
getCachedJSONQuery String
"fedora" String
"product-versions.json"
  (String -> Query -> IO [Object]
pdcProductVersions String
"pdc.fedoraproject.org" (String -> String -> Query
makeKey String
"active" String
"true")) NominalDiffTime
300