use rbxcloud::rbx::{
types::UniverseId,
v1::{DataStoreGetEntry, RbxCloud},
};
#[tokio::main]
async fn main() {
let api_key = "MY_API_KEY";
let universe_id = 9876543210;
let datastore_name = String::from("my_datastore");
let key = String::from("my_key");
let cloud = RbxCloud::new(api_key);
let datastore = cloud.datastore(UniverseId(universe_id));
let entry_result = datastore
.get_entry_string(&DataStoreGetEntry {
name: datastore_name,
scope: None,
key,
})
.await;
match entry_result {
Ok(result) => {
println!("{result}");
}
Err(e) => {
eprintln!("{e:?}");
}
}
}