arch-web: Arch Linux official and AUR web interface binding

[ library, mit, web ] [ Propose Tags ]

Arch Linux official and AUR web interface binding. See README for details.


[Skip to Readme]
Versions [faq] 0.1.0
Change log CHANGELOG.md
Dependencies aeson (>=1.5.4 && <1.6), base (>=4.10 && <5), deriving-aeson (>=0.2.6 && <0.3), exceptions (>=0.10.4 && <0.11), http-client (>=0.6.4 && <0.7), http-client-tls (>=0.3.5 && <0.4), http-types (>=0.12.3 && <0.13), lens (>=4.19.2 && <4.20), mtl (>=2.2.2 && <2.3), servant (>=0.18.2 && <0.19), servant-client (>=0.18.2 && <0.19), servant-client-core (>=0.18.2 && <0.19), text (>=1.2.3 && <1.3), time (>=1.9.3 && <1.10) [details]
License MIT
Copyright Copyright (c) berberman 2021
Author berberman
Maintainer berberman <berberman@yandex.com>
Category Web
Home page https://github.com/berberman/arch-web
Bug tracker https://github.com/berberman/arch-web/issues
Source repo head: git clone https://github.com/berberman/arch-web
Uploaded by berberman at 2021-01-14T07:23:38Z
Distributions
Downloads 24 total (24 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-01-14 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for arch-web-0.1.0

[back to package description]

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