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]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.1.1, 0.2
Change log CHANGELOG.md
Dependencies aeson (>=1.5.4 && <1.6 || >=2.0 && <2.2), 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]
License MIT
Copyright Copyright (c) berberman 2021
Author berberman
Maintainer berberman <berberman@yandex.com>
Revised Revision 1 made by felixonmars at 2023-10-11T14:36:01Z
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 felixonmars at 2023-05-30T14:38:58Z
Distributions Arch:0.2, NixOS:0.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1093 total (28 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-05-30 [all 1 reports]

Readme for arch-web-0.2

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