crptmem c081a4e7b5 minor: remove println | před 7 měsíci | |
---|---|---|
.github | před 7 měsíci | |
src | před 7 měsíci | |
.gitignore | před 7 měsíci | |
Cargo.lock | před 7 měsíci | |
Cargo.toml | před 7 měsíci | |
LICENSE | před 7 měsíci | |
README.md | před 7 měsíci |
A Rust library for Boosty closed API
$ cargo add boosty-rs
use std::error::Error;
use boosty_rs::request;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let response = request::fetch_posts("boosty".to_string(), None).await?;
println!("{:?}", response);
Ok(())
}
use std::error::Error;
use boosty_rs::request;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let response = request::fetch_post("boosty".to_string(), "a4dc61c8-4ff9-495b-946b-3982efef68fe".to_string(), None).await?;
println!("{:?}", response);
Ok(())
}
use std::error::Error;
use boosty_rs::request;
use boosty_rs::auth::Auth;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let response = request::fetch_posts("boosty".to_string(), Auth::new("access_token".to_string())).await?;
println!("{:?}", response);
Ok(())
}