[][src]Function egg_mode::user::lookup

pub fn lookup<'a, T, I>(
    accts: I,
    token: &Token
) -> FutureResponse<Vec<TwitterUser>> where
    T: Into<UserID<'a>>,
    I: IntoIterator<Item = T>, 

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

use tokio::runtime::current_thread::block_on_all;
let mut list: Vec<u64> = Vec::new();

list.push(1234);
list.push(2345);

let users = block_on_all(egg_mode::user::lookup(&list, &token)).unwrap();
use tokio::runtime::current_thread::block_on_all;
let mut list: Vec<&str> = Vec::new();

list.push("rustlang");
list.push("ThisWeekInRust");

let users = block_on_all(egg_mode::user::lookup(&list, &token)).unwrap();
use tokio::runtime::current_thread::block_on_all;
let mut list: Vec<String> = Vec::new();

list.push("rustlang".to_string());
list.push("ThisWeekInRust".to_string());

let users = block_on_all(egg_mode::user::lookup(&list, &token)).unwrap();
use tokio::runtime::current_thread::block_on_all;
let mut list: Vec<egg_mode::user::UserID> = Vec::new();

list.push(1234.into());
list.push("rustlang".into());

let users = block_on_all(egg_mode::user::lookup(&list, &token)).unwrap();