Module twitch_api2::helix::moderation::get_banned_users
source · [−]Available on crate feature
helix
only.Expand description
Returns all banned and timed-out users in a channel.
get-banned-users
Accessing the endpoint
Request: GetBannedUsersRequest
To use this endpoint, construct a GetBannedUsersRequest
with the GetBannedUsersRequest::builder()
method.
use twitch_api2::helix::moderation::get_banned_users;
let request = get_banned_users::GetBannedUsersRequest::builder()
.broadcaster_id("1234")
.build();
Response: BannedUser
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, moderation::get_banned_users};
let request = get_banned_users::GetBannedUsersRequest::builder()
.broadcaster_id("1234")
.build();
let response: Vec<get_banned_users::BannedUser> = 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 GetBannedUsersRequest::parse_response(None, &request.get_uri(), response)
Structs
Return Values for Get Banned Users
Query Parameters for Get Banned Users