Module check_user_subscription

Source
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::broadcaster_id() method.

use twitch_api::helix::subscriptions::check_user_subscription;
let request =
    check_user_subscription::CheckUserSubscriptionRequest::broadcaster_id(
        "1234",
    );

§Response: UserSubscription

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

use twitch_api::helix::{self, subscriptions::check_user_subscription};
let request = check_user_subscription::CheckUserSubscriptionRequest::broadcaster_id("1234");
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§

CheckUserSubscriptionRequest
Query Parameters for Check User Subscription
UserSubscription
Return Values for Check User Subscription