Crate launchpadlib

source
Expand description

§Launchpad API

This crate provides a Rust interface to the Launchpad API. It is generated from the Launchpad API WADL document.

§Usage

use url::Url;

#[cfg(all(feature = "api-v1_0", feature = "blocking"))]
{
let client = launchpadlib::blocking::Client::anonymous("just+testing");
let service_root = launchpadlib::blocking::v1_0::service_root(&client).unwrap();
let people = service_root.people().unwrap();
let person = people.get_by_email(&client, "jelmer@jelmer.uk").unwrap();
let ssh_keys = person.sshkeys(&client).unwrap().map(|k| k.unwrap().keytext).collect::<Vec<_>>();
println!("SSH Keys: {:?}", ssh_keys);
}

§Limitations and bugs

  • While bindings are generated from the entire WADL file, I have only used a small number of them. Please report bugs if you run into issues. Launchpad’s WADL is incorrect in places, e.g. claiming that certain fields are optional while they will actually be set to null. Any problems with the WADL will impact the usability of the rust bindings.

  • See fixup.xsl for manual patches that are applied; this file is almost certainly incomplete.

Modules§

Enums§

  • The error type for this crate.

Constants§

Traits§