Module twitch_api2::helix::moderation::get_banned_events[][src]

This is supported on crate feature helix only.

Returns all banned and timed-out users in a channel. get-banned-events

Accessing the endpoint

Request: GetBannedEventsRequest

To use this endpoint, construct a GetBannedEventsRequest with the GetBannedEventsRequest::builder() method.

use twitch_api2::helix::moderation::get_banned_events;
let request = get_banned_events::GetBannedEventsRequest::builder()
    .broadcaster_id("1234")
    .build();

Response: BannedEvent

Send the request to receive the response with HelixClient::req_get().

use twitch_api2::helix::{self, moderation::get_banned_events};
let request = get_banned_events::GetBannedEventsRequest::builder()
    .broadcaster_id("1234")
    .build();
let response: Vec<get_banned_events::BannedEvent> = 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 request.parse_response(&request.get_uri()?)

Structs

BannedEvent

Return Values for Get Banned Events

GetBannedEventsRequest

Query Parameters for Get Banned Events