solscan-api 0.1.2

A Wrapper for the Solscan-API for fetching informations about SOL-Accounts and more...
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
mod test_api {
    use crate::solscan::SolscanAPI;

    #[tokio::test]
    async fn test_api_ping_404() {
        let solscan_api = SolscanAPI::new();
        let result = solscan_api.ping_status(None).await.unwrap();
        assert_eq!(result, 404)
    }

    #[tokio::test]
    async fn test_api_ping_200() {
        let solscan_api = SolscanAPI::new();
        let result = solscan_api.ping_status(Some("/block/last".to_string())).await.unwrap();
        assert_eq!(result, 200)
    }
}