Module twitch_api2::helix::goals::get_creator_goals
source · [−]Available on crate feature
helix
only.Expand description
Gets the broadcaster’s list of active goals. Use this to get the current progress of each goal.
get-creator-goals
Accessing the endpoint
Request: GetCreatorGoalsRequest
To use this endpoint, construct a GetCreatorGoalsRequest
with the GetCreatorGoalsRequest::builder()
method.
use twitch_api2::helix::goals::get_creator_goals;
let request = get_creator_goals::GetCreatorGoalsRequest::builder()
.broadcaster_id("4321".to_string())
.build();
Response: CreatorGoal
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, goals::get_creator_goals};
let request = get_creator_goals::GetCreatorGoalsRequest::builder()
.broadcaster_id("4321".to_string())
.build();
let response: Vec<get_creator_goals::CreatorGoal> = 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 GetCreatorGoalsRequest::parse_response(None, &request.get_uri(), response)
Structs
Return Values for Get Creator Goals
Query Parameters for Get Creator Goals