1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use crate::{FollowersIdsResult, FollowersListResult, TwitterAPI}; use anyhow::Result; use std::collections::HashMap; impl TwitterAPI { pub async fn follwers_ids(&self, params: &HashMap<&str, &str>) -> Result<FollowersIdsResult> { let endpoint = "https://api.twitter.com/1.1/followers/ids.json"; self.raw_get(endpoint, ¶ms).await } pub async fn follwers_list(&self, params: &HashMap<&str, &str>) -> Result<FollowersListResult> { let endpoint = "https://api.twitter.com/1.1/followers/list.json"; self.raw_get(endpoint, ¶ms).await } }