Rust client crate for https://lens.xyz
Just a draft. See on the bottom to see which APIs it currently supports.
Rust client crate for https://lens.xyz
```Rust use lensclient; use lensclient::{Chain, Net};
fn main(){ let address = "0x0000000000000000000000000000000000000000"; let client = lens_client::lens::LensClient::new(Chain::Polygon, Net::Main);
let default_profile = client.get_default_profile_by_address(String::from(address));
match default_profile {
Ok(profile) => {
println!("{:?}", profile);
let profile_id = profile.data.default_profile.id;
let followers = client.get_followers(profile_id,10);
match followers {
Ok(followers) => {
println!("{:?}", followers);
}
Err(e) => {
println!("{:?}", e);
}
}
}
Err(e) => {
println!("{:?}", e);
}
}
} ```
[X] Profile : create profile
[X] Follow : does follow
[X] Follow : get following
[X] Auth : get challenge
This crate integrates some functions to handle local KeyStores and use them to interact with Lens, mostly useful for development purposes.