Available on crate feature helix only.
Expand description

Checks if a specific user is subscribed to a specific channel. check-user-subscription

Accessing the endpoint

Request: CheckUserSubscriptionRequest

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

use twitch_api2::helix::subscriptions::check_user_subscription;
let request = check_user_subscription::CheckUserSubscriptionRequest::builder()
    .broadcaster_id("1234")
    .build();

Response: UserSubscription

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

use twitch_api2::helix::{self, subscriptions::check_user_subscription};
let request = check_user_subscription::CheckUserSubscriptionRequest::builder()
    .broadcaster_id("1234")
    .build();
let response: check_user_subscription::UserSubscription = 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 CheckUserSubscriptionRequest::parse_response(None, &request.get_uri(), response)

Structs