Module twitch_api2::helix::games::get_games [−][src]
This is supported on crate feature
helix
only.Gets game information by game ID or name.
get-games
Accessing the endpoint
Request: GetGamesRequest
To use this endpoint, construct a GetGamesRequest
with the GetGamesRequest::builder()
method.
use twitch_api2::helix::games::get_games; let request = get_games::GetGamesRequest::builder() .id(vec!["4321".to_string()]) .build();
Response: Game
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, games::get_games}; let request = get_games::GetGamesRequest::builder() .id(vec!["4321".to_string()]) .build(); let response: Vec<get_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
GetGamesRequest | Query Parameters for Get Games |
Type Definitions
Game | Return Values for Get Games |