Function egg_mode::user::lookup [−][src]
pub async fn lookup<T, I>(
accts: I,
token: &Token
) -> Result<Response<Vec<TwitterUser>>> where
T: Into<UserID>,
I: IntoIterator<Item = T>,
Expand description
Look up profile information for several Twitter users.
This function is set up so it can be called with a few different Item types; whether just IDs
with u64
, just screen names with &str
or String
, or even a mix of both (by using UserID
directly).
Examples
let mut list: Vec<u64> = Vec::new(); list.push(1234); list.push(2345); let users = egg_mode::user::lookup(list, &token).await.unwrap();
let mut list: Vec<&str> = Vec::new(); list.push("rustlang"); list.push("ThisWeekInRust"); let users = egg_mode::user::lookup(list, &token).await.unwrap();
let mut list: Vec<String> = Vec::new(); list.push("rustlang".to_string()); list.push("ThisWeekInRust".to_string()); let users = egg_mode::user::lookup(list, &token).await.unwrap();
let mut list: Vec<egg_mode::user::UserID> = Vec::new(); list.push(1234.into()); list.push("rustlang".into()); let users = egg_mode::user::lookup(list, &token).await.unwrap();