Module twitch_api2::helix::points::get_custom_reward
source · [−]Available on crate feature
helix
only.Expand description
Returns a list of Custom Reward objects for the Custom Rewards on a channel.
Developers only have access to update and delete rewards that were created programmatically by the same/calling client_id.
get-custom-reward-redemption
Accessing the endpoint
Request: GetCustomRewardRequest
To use this endpoint, construct a GetCustomRewardRequest
with the GetCustomRewardRequest::builder()
method.
use twitch_api2::helix::points::GetCustomRewardRequest;
let request = GetCustomRewardRequest::builder()
.broadcaster_id("274637212".to_string())
.build();
Response: CustomReward
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix;
use twitch_api2::helix::points::{CustomReward, GetCustomRewardRequest};
let request = GetCustomRewardRequest::builder()
.broadcaster_id("274637212".to_string())
.build();
let response: Vec<CustomReward> = 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 GetCustomRewardRequest::parse_response(None, &request.get_uri(), response)
Structs
Return Values for Get Custom Reward
Query Parameters for Get Custom Reward