Description
Arch Linux official and AUR web interface binding.
Description
Arch Linux official and AUR web interface binding. See README for details.
README.md
arch-web
arch-web
is a simple library providing functions to access Official repositories web interface and Aurweb RPC interface, based on servant-client.
Documentation
Documentation of released version is available at hackage, and of master is at github pages.
Example
- Print linux's version:
import Control.Lens
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import qualified Data.Text as T
import Web.ArchLinux
import Web.ArchLinux.Types.Lens
main :: IO ()
main = void . runAPIClient' $ do
linux <- getPackageDetails Core X86_64 "linux"
liftIO . putStrLn $ "linux in [core] has version: " <> T.unpack (linux ^. pkgver)
- Search keywords "yay":
import Control.Lens
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Web.ArchLinux
import Web.ArchLinux.Types.Lens
main :: IO ()
main = void . runAPIClient' $ do
response <- searchAur ByNameOrDesc "yay"
liftIO . print $ (response ^. results ^.. each . name)
- ...