farcaster-rs 1.0.1

A rust crate to interface & interact with the Farcaster.xyz contracts & APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::constants::merkle::API_ROOT;
use crate::Farcaster;
use std::error::Error;

impl Farcaster {
    pub async fn get_api_health() -> Result<String, Box<dyn Error>> {
        let api_health = reqwest::Client::new()
            .get(format!("{}/healthcheck", API_ROOT))
            .header("Accept", "application/json")
            .send()
            .await?
            .text()
            .await?;

        Ok(api_health)
    }
}