Crates.io | nsg |
lib.rs | nsg |
version | 1.0.0 |
source | src |
created_at | 2024-07-27 19:37:34.396022 |
updated_at | 2024-07-27 19:37:34.396022 |
description | A library for interacting with Portal |
homepage | https://github.com/TheTS-labs/nsg |
repository | https://github.com/TheTS-labs/nsg |
max_upload_size | |
id | 1317492 |
size | 169,456 |
Nsg is a library for interacting with Portal. It provides read-only methods for basic search, view request, work schedule and brief request
use nsg::Nsg;
use chrono::Utc;
#[tokio::main]
async fn main() {
let nsg = Nsg::from_creds(
"login".to_string(),
"password_hash".to_string(),
"https://net-stroy.itnet.lviv.ua".to_string(),
"client".to_string(),
"x.y".to_string(),
).await.unwrap();
println!("Work schedule (orders) for today: {:#?}", nsg.work_schedule(Utc::now().date_naive()).await);
println!("Brief request of 950974: {:#?}", nsg.brief_request(950974).await);
println!("Full information about 950974: {:#?}", nsg.view_request(950974).await);
println!("Search for 95097%: {:#?}", nsg.basic_search("95097%").await);
}
To use nsg
lib install it via cargo
:
cargo add nsg