Crates.io | waseda-moodle |
lib.rs | waseda-moodle |
version | 0.2.0 |
source | src |
created_at | 2020-05-11 00:13:05.918396 |
updated_at | 2020-05-17 06:40:36.962061 |
description | A simple crate to get a list of the enrolled courses |
homepage | |
repository | https://github.com/mkihr-ojisan/waseda-moodle |
max_upload_size | |
id | 239873 |
size | 15,995 |
A simple crate to get a list of the enrolled courses.
use waseda-moodle::*;
#[tokio::main]
async fn main() -> Result<()> {
//login
let session = Session::login("login id", "password").await?;
//get a list of the enrolled courses (except for hidden courses)
let list = course::fetch_enrolled_courses(&session).await?;
//get a list of the hidden courses
let hidden_list = course::fetch_hidden_courses(&session).await?;
println!("list: {:#?}", list);
println!("hidden_list: {:#?}", hidden_list);
Ok(())
}