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

[ library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.1.1, 0.2, 0.3, 0.3.1 (info)
Change log CHANGELOG.md
Dependencies aeson (>=1.5.4 && <1.6 || >=2.0 && <2.3), base (>=4.10 && <5), deriving-aeson (>=0.2.6 && <0.3), exceptions (>=0.10.4 && <0.11), http-client (>=0.6.4 && <0.7 || >=0.7.4 && <0.8), http-client-tls (>=0.3.5 && <0.4), http-types (>=0.12.3 && <0.13), lens (>=4.19.2 && <4.20 || >=5 && <5.3), mtl, servant (>=0.18 && <0.21), servant-client (>=0.18 && <0.21), servant-client-core (>=0.18 && <0.21), text, time [details]
Tested with ghc ==8.10.7 || ==9.0.2
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 2024-10-25T04:10:49Z
Distributions Arch:0.2, NixOS:0.3.1
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1183 total (25 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-10-25 [all 1 reports]

Readme for arch-web-0.3.1

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