Available on crate feature
helix
only.Expand description
Gets games sorted by number of current viewers on Twitch, most popular first.
get-top-games
§Accessing the endpoint
§Request: GetTopGamesRequest
To use this endpoint, construct a GetTopGamesRequest
with the GetTopGamesRequest::default()
method.
use twitch_api::helix::games::get_top_games;
let request = get_top_games::GetTopGamesRequest::default().first(100);
§Response: Game
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api::helix::{self, games::get_top_games};
let request = get_top_games::GetTopGamesRequest::default();
let response: Vec<get_top_games::Game> = 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 GetTopGamesRequest::parse_response(None, &request.get_uri(), response)
Structs§
- GetTop
Games Request - Query Parameters for Get Top Games
Type Aliases§
- Game
- Return Values for Get Top Games