surge-sdk 0.1.1-alpha.2

Rust SDK for Surge.sh API - programmatically manage static site deployments, domains, SSL, and DNS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
  tests/common.rs
*/
use surge_sdk::{Config, SurgeSdk};

pub struct TestServer {
    pub server: mockito::ServerGuard,
    pub client: SurgeSdk,
}

impl TestServer {
    pub async fn new() -> Self {
        let server = mockito::Server::new_async().await;
        let config = Config::new(server.url(), "0.1.0").unwrap();
        let client = SurgeSdk::new(config).unwrap();
        Self { server, client }
    }
}