Module twitch_api2::helix::points::get_custom_reward_redemption[][src]

This is supported on crate feature helix only.

Returns Custom Reward Redemption objects for a Custom Reward on a channel that was created by the same client_id.

Developers only have access to get and update redemptions for the rewards they created. get-custom-reward-redemption

Accessing the endpoint

Request: GetCustomRewardRedemptionRequest

To use this endpoint, construct a GetCustomRewardRedemptionRequest with the GetCustomRewardRedemptionRequest::builder() method.

use twitch_api2::helix::points::{CustomRewardRedemptionStatus, GetCustomRewardRedemptionRequest};
let request = GetCustomRewardRedemptionRequest::builder()
    .broadcaster_id("274637212".to_string())
    .reward_id("92af127c-7326-4483-a52b-b0da0be61c01".to_string())
    .status(CustomRewardRedemptionStatus::Canceled)
    .build();

Response: CustomRewardRedemption

Send the request to receive the response with HelixClient::req_get().

use twitch_api2::helix;
use twitch_api2::helix::points::{CustomRewardRedemptionStatus, CustomRewardRedemption, GetCustomRewardRedemptionRequest};
let request = GetCustomRewardRedemptionRequest::builder()
    .broadcaster_id("274637212".to_string())
    .reward_id("92af127c-7326-4483-a52b-b0da0be61c01".to_string())
    .status(CustomRewardRedemptionStatus::Canceled)
    .build();
let response: Vec<CustomRewardRedemption> = 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

CustomRewardRedemption

Return Values for Get Custom Reward Redemption

GetCustomRewardRedemptionRequest

Query Parameters for Get Custom Reward Redemption

Reward

Information about the reward involved