1 2 3 4 5 6 7 8 9 10 11 12
use crate::{RetweetResult, TwitterAPI}; use anyhow::Result; // TODO: Think adding a simple API module (kuon::simple::retweet) impl TwitterAPI { pub async fn retweet(&self, id: &str) -> Result<RetweetResult> { let endpoint = &format!("https://api.twitter.com/1.1/statuses/retweet/{}.json", id); let params = maplit::hashmap! {}; self.raw_post::<RetweetResult>(endpoint, ¶ms).await } }