Skip to main content

roblox_api/api/premium_features/
v1.rs

1use crate::{Error, client::Client};
2
3pub const URL: &str = "https://premiumfeatures.roblox.com/v1";
4
5pub async fn is_premium(client: &mut Client, id: u64) -> Result<bool, Error> {
6    let result = client
7        .requestor
8        .client
9        .get(format!("{URL}/users/{id}/validate-membership"))
10        .headers(client.requestor.default_headers.clone())
11        .send()
12        .await;
13
14    let response = client.requestor.validate_response(result).await?;
15    client.requestor.parse_json::<bool>(response).await
16}