pub fn create_private_paste(
contents: CreateObject,
auth_token: &str,
) -> Result<PasteObject, Error>
Expand description
Uses the CreateObject
and &str
(auth_token
) to
send a paste to pastemyst
held under your account which you can configure
to be private/public or not. You also get the
authority to delete that paste. This is a
synchronous method.
ยงExamples
use pastemyst::paste::create_private_paste;
use pastemyst::paste::get_paste;
use pastemyst::paste::PasteResult;
#[tokio::main]
async fn main() -> Result<()> {
let contents = get_paste("hipfqanx");
let paste = create_private_paste(contents, "Your PasteMyst Token. Get it from: https://paste.myst.rs/user/settings").await?;
println!("{}", paste.isPrivate);
Ok(())
}