-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3832fb3
commit 1801283
Showing
3 changed files
with
39 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
# kuliya for Rust | ||
# kuliya | ||
|
||
Algeria's college hierarchy dataset as Cargo package | ||
Algeria's college hierarchy dataset as a crate with useful APIs. | ||
|
||
# Get started | ||
Example | ||
|
||
WIP | ||
```rust | ||
use kuliya::r#static::api::get_node_by_path; | ||
|
||
# Contribute | ||
let faculty_of_science_and_technology = get_node_by_path("umkb/fst"); | ||
|
||
Please install Rust compiler using https://rustup.rs/ | ||
assert_eq!(faculty_of_science_and_technology.is_some(), true); | ||
|
||
Feel free to ask for help in [#kuliya](https://dzcode.slack.com/archives/C01C0155CKC) group chat | ||
let faculty_of_science_and_technology = faculty_of_science_and_technology.unwrap(); | ||
|
||
assert_eq!(faculty_of_science_and_technology.name.ar, "كلية العلوم والتكنلوجيا"); | ||
|
||
// when the path is not found, the function returns None | ||
let non_existing_node = get_node_by_path("umkb/fst/unknown"); | ||
|
||
assert_eq!(non_existing_node.is_none(), true); | ||
``` | ||
|
||
License: MIT |