update_form/update_form.rs
1use mailerlite_rs::{data::Data, response::Response, MailerLite};
2
3#[tokio::main]
4async fn main() {
5 let api_key: String = String::from("Your MailerLite API Key");
6
7 let mailerlite: MailerLite = MailerLite::new(api_key);
8
9 let id: String = String::from("Your Form ID");
10
11 let data: Data = Data::new().add("name", "Dummy Form");
12
13 let response: Response = mailerlite.form().update(id, data.clone()).await;
14
15 println!("{:#?}", response);
16}