Module twitch_api2::helix::hypetrain::get_hypetrain_events[][src]

This is supported on crate feature helix only.

Gets the information of the most recent Hype Train of the given channel ID. get-hype-train-events

Accessing the endpoint

Request: GetHypeTrainEventsRequest

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

use twitch_api2::helix::hypetrain::get_hypetrain_events;
let request = get_hypetrain_events::GetHypeTrainEventsRequest::builder()
    .broadcaster_id("4321".to_string())
    .build();

Response: HypeTrainEvent

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

use twitch_api2::helix::{self, hypetrain::get_hypetrain_events};
let request = get_hypetrain_events::GetHypeTrainEventsRequest::builder()
    .broadcaster_id("4321".to_string())
    .build();
let response: Vec<get_hypetrain_events::HypeTrainEvent> = 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

GetHypeTrainEventsRequest

Query Parameters for Get Hype Train Events

HypeTrainEvent

Return Values for Get Hype Train Events

HypeTrainEventData

Event data for

Enums

HypeTrainEventType

Type of Hype Train event