Module twitch_api2::helix::streams::get_streams
source · [−]Available on crate feature
helix
only.Expand description
Gets information about active streams.
get-streams
Accessing the endpoint
Request: GetStreamsRequest
To use this endpoint, construct a GetStreamsRequest
with the GetStreamsRequest::builder()
method.
use twitch_api2::helix::streams::get_streams;
let request = get_streams::GetStreamsRequest::builder()
.user_login(vec!["justintvfan".into()])
.build();
Response: Stream
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, streams::get_streams};
let request = get_streams::GetStreamsRequest::builder()
.user_login(vec!["justintvfan".into()])
.build();
let response: Vec<get_streams::Stream> = 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 GetStreamsRequest::parse_response(None, &request.get_uri(), response)
Structs
Query Parameters for Get Streams
Return Values for Get Streams