https://github.com/progzone122/aur-wrapper
A simple wrapper for RPC API and RSS for AUR (Arch User Repository)
https://github.com/progzone122/aur-wrapper
api arch aur javascript packages rpc rss typescript wrapper
Last synced: about 2 months ago
JSON representation
A simple wrapper for RPC API and RSS for AUR (Arch User Repository)
- Host: GitHub
- URL: https://github.com/progzone122/aur-wrapper
- Owner: progzone122
- License: gpl-3.0
- Created: 2025-03-14T12:03:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T22:03:03.000Z (about 1 year ago)
- Last Synced: 2025-10-09T02:38:27.876Z (6 months ago)
- Topics: api, arch, aur, javascript, packages, rpc, rss, typescript, wrapper
- Language: TypeScript
- Homepage: https://npmjs.com/package/aur-wrapper
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AUR TypeScript Wrapper
A simple wrapper for RPC API and RSS for AUR (Arch User Repository)
## Install
```shell
npm install aur-wrapper
```
## Example using
```ts
import AurWebWrapper from "aur-wrapper";
let wrapper: AurWebWrapper = new AurWebWrapper({
proxy: true
});
wrapper.rpc.getPackageInfo("warp-gui").then((info) => {
if (info.success) {
console.log(info);
} else {
console.error(info)
}
})
wrapper.rss.getLatestPackages().then((packages) => {
if (packages.success) {
console.log(packages.data);
} else {
console.error(packages.error);
}
})
wrapper.rpc.getPackagesInfo(["warp-gui", "mixerdialog"]).then((info) => {
if (info.success) {
console.log(info);
} else {
console.error(info)
}
})
wrapper.rpc.search("warp").then(result => {
if (result.success) {
console.log(result.data.results.slice(0, 2));
}
});
```
## Configuration
Configure the wrapper instance before using it.
| Argument | Description | Type | Default |
|----------|--------------------------------------------------------------------------------|---------|---------------------------|
| baseUrl | Domain for all requests to AUR | string | https://aur.archlinux.org |
| proxy | Proxies all requests through the [corsproxy.io](https://corsproxy.io) service | boolean | false |
### Server-side
If you are using the library on the server side, no configuration is required.
```ts
let wrapper: AurWebWrapper = new AurWebWrapper({});
```
### Client-side
If you want to send requests on the client side and bypass CORS. Configure the use of proxy.
```ts
let wrapper: AurWebWrapper = new AurWebWrapper({
proxy: true
});
```