Function egg_mode::user::lookup
[−]
[src]
pub fn lookup<'a, T, I>(
accts: I,
token: &Token
) -> WebResponse<Vec<TwitterUser>> where
T: Into<UserID<'a>>,
I: IntoIterator<Item = T>,
Lookup a set of Twitter users by either ID and screen name, as applicable.
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).unwrap();
let mut list: Vec<&str> = Vec::new(); list.push("rustlang"); list.push("ThisWeekInRust"); let users = egg_mode::user::lookup(&list, &token).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).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).unwrap();