Skip to main content

get_entry/
get-entry.rs

1use rbx_ds_cloud::api::datastore_api::get_entry;
2use rbx_ds_cloud::api::endpoint_structs::GetEntry;
3
4use reqwest::Response;
5
6#[tokio::main]
7async fn main() -> Result<(), Box<dyn std::error::Error>> {
8    let api_key = "API_KEY".to_string();
9    let universe_id: u64 = 0;
10
11    let datastore_name: String = "DATASTORE_NAME".to_string();
12    let key: String = "ENTRY_KEY".to_string();
13    let scope: Option<String> = None; // None = default to global
14
15    let entry_struct = GetEntry {
16        api_key,
17        universe_id,
18        datastore_name,
19        key,
20        scope,
21    };
22
23    let res: Response = get_entry(&entry_struct).await?;
24
25    let body = res.text().await?;
26    println!("{}", body);
27
28    Ok(())
29}