Crates.io | nclbk |
lib.rs | nclbk |
version | 0.0.1 |
source | src |
created_at | 2023-03-04 22:00:55.658798 |
updated_at | 2023-03-05 14:01:52.582 |
description | A Nextcloud Bookmarks API Client |
homepage | |
repository | https://github.com/cromulentbanana/nclbk/ |
max_upload_size | |
id | 800876 |
size | 13,850 |
A Nextcloud Bookmark API Client.
Currently a first draft implementation, not stable or ready for consumption.
rust stable >=1.46
cargo test
rust stable >=1.46
cargo-watch -x run
Currently nothing to build, yet.
rust stable >=1.46
cargo build --release
Currently nothing to build, yet.
use libnclbk;
use url::Url;
fn main() {
let auth_id: String = "<your user>".to_owned();
let base_url: Url = "https://<your nextcloud>".to_owned().parse().unwrap();
// Create an `app password` at https://<your nextcloud>/index.php/settings/user/security and export it as an env var
let key: &str = "NC_AUTH_SECRET";
let auth_secret: String = std::env::var(key).to_owned().unwrap();
let bookmark_client = libnclbk::BookmarkAPIClient::new(auth_id, auth_secret, base_url).unwrap();
println!("{:?}", bookmark_client);
}