https://github.com/berberman/arch-web
Arch Linux official and AUR web interface binding
https://github.com/berberman/arch-web
Last synced: about 1 year ago
JSON representation
Arch Linux official and AUR web interface binding
- Host: GitHub
- URL: https://github.com/berberman/arch-web
- Owner: berberman
- License: mit
- Created: 2021-01-13T13:57:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T04:12:04.000Z (over 1 year ago)
- Last Synced: 2025-03-26T22:36:06.438Z (about 1 year ago)
- Language: Haskell
- Homepage:
- Size: 320 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# arch-web
[](https://hackage.haskell.org/package/arch-web)
[](LICENSE)

`arch-web` is a simple library providing functions to access [Official repositories web interface](https://wiki.archlinux.org/index.php/Official_repositories_web_interface) and [Aurweb RPC interface](https://wiki.archlinux.org/index.php/Aurweb_RPC_interface), based on [servant-client](https://hackage.haskell.org/package/servant-client).
## Documentation
Documentation of released version is available at [hackage](https://hackage.haskell.org/package/arch-web),
and of master is at [github pages](https://berberman.github.io/arch-web).
## Example
* Print [linux](https://archlinux.org/packages/core/x86_64/linux/)'s version:
```haskell
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":
```haskell
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)
```
* ...