Module twitch_api2::helix::games::get_top_games [−][src]
This is supported on crate feature
helix
only.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::builder()
method.
use twitch_api2::helix::games::get_top_games; let request = get_top_games::GetTopGamesRequest::builder() .first(100) .build();
Response: Game
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, games::get_top_games}; let request = get_top_games::GetTopGamesRequest::builder() .build(); 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 request.parse_response(&request.get_uri()?)
Structs
GetTopGamesRequest | Query Parameters for Get Top Games |
Type Definitions
Game | Return Values for Get Top Games |