Expand description
This is a library for interacting with the Arch User Repository (AUR). It is a work in progress and is not ready for production use. The goal is to provide a simple interface for interacting with the AUR.
For a basic name search call search_package
which takes a package name
and returns a SearchResponse
struct. This struct contains a results
field which is a vector of Package
structs. These structs contain
information about the package.
§Example
#[tokio::main]
async fn main() {
let request = aur_rs::Request::default();
let response = request.search_package_by_name("yay-bin").await.unwrap();
println!("#{:#?}", response);
}
Another way to get information about a package is to use the package_info
function. This function takes a package name and returns ReturnData
.
§Example
#[tokio::main]
async fn main() {
let request = aur_rs::Request::default();
let response = request.search_info_by_name("yay-bin").await.unwrap();
if let Some(keywords) = &response.results[0].keywords {
println!("Keywords: {:?}", keywords);
}
}
Structs§
- Package
- This is a package. TODO(2020-05-03): Add more documentation.
- Request
- This is a request to the AUR RPC
- Return
Data - This is a a response to a search request.