ft-rs 0.0.3

A Rust library for the 42School API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use ft_rs::FtClient;

#[tokio::main]
async fn main() -> ft_rs::Result<()> {
  let client = FtClient::from_app(
    std::env::var("FT_RS_TEST_UID").expect("FT_RS_TEST_UID not set"), 
    std::env::var("FT_RS_TEST_SECRET").expect("FT_RS_TEST_SECRET not set")
  )?;
  let token = client.fetch_token().await?;
  println!("Token: {:?}", token);
  Ok(())
}