Expand description
Nsg is a library for interacting with Portal. It provides read-only methods for basic search, view request, work schedule and brief request
Note: This library is written to work only with users with the role of “Монтажник (все)” It may not work properly with other roles
use chrono::Utc;
use nsg::Nsg;
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?;
// Fetch orders from Work Schedule for today
let work_schedule = nsg.work_schedule(Utc::now().date_naive()).await;
println!("{:?}", work_schedule.0);
§Terminology
- Internal order id: Kyivstar assigns unique identifiers to its orders. When orders are processed by the Portal, it creates its own record of the order in its database, thus creating an internal identifier for the request
- Data pillar: Portal’s endpoint or the way to access data from Portal.
There are 4 data pillars:
BasicSearch,BriefRequest,ViewRequestandWorkSchedule - Portal: Refers to “Нет-Строй”’s “IC Портал-К”
- Kyivstar’s version: Kyivstar’s data is not always 100% right. It’s really apparent in the client’s full name
Modules§
- basic_
search - Basic search parser (collection of
SearchEntrys) - brief_
request - Brief request parser
- data
- Essential types for representing order’s data
- error
Nsgerror- serializable_
int_ error_ kind IntErrorKindwith derivedSerializeandDeserializeimplementations- serializable_
parse_ error_ kind ParseErrorKindwith derivedSerializeandDeserializeimplementations- view_
request - View request parser
- work_
schedule - Work schedule parser (collection of
Orders)
Structs§
- Nsg
- Wrapper around data pillar parsers and Portal