use mailerlite_rs::{data::Data, response::Response, MailerLite}; #[tokio::main] async fn main() { let api_key: String = String::from("Your MailerLite API Key"); let mailerlite: MailerLite = MailerLite::new(api_key); let id: String = String::from("Your Subscriber ID"); let data: Data = Data::new() .add("fields[name]", "John") .add("fields[last_name]", "Doe"); let response: Response = mailerlite.subscriber().update(id, data.clone()).await; println!("{:#?}", response); }