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 [RSS] [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 || >=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.1), 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>
Revised Revision 1 made by berberman at 2021-07-17T03:02:46Z
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 Arch:0.1.0, NixOS:0.1.0
Downloads 268 total (29 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

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

For package maintainers and hackage trustees

Candidates


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