@hackage arch-web0.3.1

Arch Linux official and AUR web interface binding

arch-web

Hackage MIT license build

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

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)
  • ...