fetch_posts_raw

Function fetch_posts_raw 

Source
pub async fn fetch_posts_raw(
    blog_name: String,
    limit: i64,
    auth: Option<Auth>,
) -> Result<Value, Error>
Expand description

Fetches all posts from blog but do not parse, returns a serde Value

§Arguments

  • blog_name - Name of a blog to get posts
  • limit - 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_raw("crptmem".to_string(), 300, None).await?;
    println!("{:?}", posts); 
    Ok(())
}