Permalink
Browse files

docs for user::lookup

  • Loading branch information...
QuietMisdreavus committed Aug 20, 2016
1 parent 98b7042 commit c757221a22cf1e8cd5f75ba71b5ca91b98a07d61
Showing with 39 additions and 1 deletion.
  1. +39 −1 src/user/mod.rs
@@ -91,7 +91,45 @@ pub fn lookup_names<S: Borrow<str>>(names: &[S], con_token: &auth::Token, access
parse_response(&mut resp)
}
///Lookup a set of Twitter users by both ID and screen name, as applicable.
///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 any number of slice types; whether just IDs,
///just screen names, or even a mix of both (by using &[UserID] directly).
///
///## Examples
///
///```rust,no_run
///# let con_token = egg_mode::Token::new("", "");
///# let access_token = egg_mode::Token::new("", "");
///let mut list: Vec<i64> = Vec::new();
///
///list.push(1234);
///list.push(2345);
///
///let users = egg_mode::user::lookup(&list, &con_token, &access_token).unwrap();
///```
///
///```rust,no_run
///# let con_token = egg_mode::Token::new("", "");
///# let access_token = egg_mode::Token::new("", "");
///let mut list: Vec<String> = Vec::new();
///
///list.push("rustlang".into());
///list.push("ThisWeekInRust".into());
///
///let users = egg_mode::user::lookup(&list, &con_token, &access_token).unwrap();
///```
///
///```rust,no_run
///# let con_token = egg_mode::Token::new("", "");
///# let access_token = egg_mode::Token::new("", "");
///let mut list: Vec<egg_mode::UserID> = Vec::new();
///
///list.push(1234.into());
///list.push("rustlang".into());
///
///let users = egg_mode::user::lookup(&list, &con_token, &access_token).unwrap();
///```
pub fn lookup<'a, T: 'a>(accts: &'a [T], con_token: &auth::Token, access_token: &auth::Token)
-> Result<Response<Vec<TwitterUser>>, error::Error>
where &'a T: Into<UserID<'a>>

0 comments on commit c757221

Please sign in to comment.