pub async fn fetch_posts(
blog_name: String,
limit: i64,
auth: Option<Auth>,
) -> Result<Vec<Post>, Error>Expand description
Fetches all posts from blog, retuns a vector of Post wrapped in Result
§Arguments
blog_name- Name of a blog to get postslimit- Count of posts to return (Boosty default when no provided in request is 100)auth- Optional argument for authorization in API
§Examples
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let posts = boosty_rs::request::fetch_posts("crptmem".to_string(), 300, None).await?;
println!("{:?}", posts);
Ok(())
}