Available on crate feature
helix
only.Expand description
Gets information about one or more specified Twitch users.
get-users
§Request: GetUsersRequest
To use this endpoint, construct a GetUsersRequest
with the GetUsersRequest::logins()
, GetUsersRequest::ids()
or GetUsersRequest::new()
method.
use twitch_api::helix::users::get_users;
let mut request = get_users::GetUsersRequest::new();
§Response: User
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api::helix::{self, users::get_users};
let ids: &[&types::UserIdRef] = &["1234".into()];
let logins: &[&types::UserNameRef] = &["justintvfan".into()];
let mut request = get_users::GetUsersRequest::new();
request.login = logins.into();
request.id = ids.into();
let response: Vec<get_users::User> = client.req_get(request, &token).await?.data;
You can also get the http::Request
with request.create_request(&token, &client_id)
and parse the http::Response
with GetUsersRequest::parse_response(None, &request.get_uri(), response)
Structs§
- GetUsers
Request - Query Parameters for Get Users
- User
- Return Values for Get Users