aboutsummaryrefslogtreecommitdiff
path: root/lib/cfcache/examples/purge.rs
blob: 22c81a4ebfef52c4f199b3fbaca28a8af32678cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use eyre::Result;

#[tokio::main]
async fn main() -> Result<()> {
    kankyo::init()?;

    let key = std::env::var("CF_TOKEN")?;
    let zone_id = std::env::var("CF_ZONE_ID")?;

    let cli = cfcache::Client::new(key, zone_id)?;
    cli.purge(vec!["https://christine.website/.within/health".to_string()])
        .await?;

    Ok(())
}