A high performance interface for the Roblox API.
This library is designed to be high-performance capable, meaning that it supports proxies and is capable of making requests in parallel.
Note that this crate is currently economy-focused, meaning that endpoints related to items and trades are currently prioritized.
Extensive documentation is used throughout this crate. All public methods in this crate are documented and have at least one corresponding example.
Documentation can be found here.
auth.roblox.com/*
]
Client::force_refresh_xcsrf_token
apis.roblox.com/*
]
Client::non_tradable_limited_details
Client::collectible_product_id
Client::collectible_product_id_bulk
Client::collectible_creator_id
Client::purchase_non_tradable_limited
catalog.roblox.com/*
]
Client::item_details
Client::product_id
Client::product_id_bulk
Client::collectible_item_id
Client::collectible_item_id_bulk
Client::avatar_catalog_search
chat.roblox.com/*
]
Client::unread_conversation_count
economy.roblox.com/*
]
Client::robux
Client::resellers
Client::user_sales
Client::put_limited_on_sale
Client::take_limited_off_sale
Client::purchase_tradable_limited
groups.roblox.com/*
]
Client::group_roles
Client::group_role_members
Client::set_group_member_role
presence.roblox.com/*
]
Client::register_presence
privatemessages.roblox.com/*
]
Client::messages
trades.roblox.com/*
]
Client::trades
users.roblox.com/*
]
Client::user_id
Client::username
Client::display_name
Client::user_search
Client::user_details
You can add the latest version of roboat to your project by running:
bash
cargo add roboat
Alternatively, you can add a specific version of roboat to your project by adding the crate to your Cargo.toml
:
toml
[dependencies]
roboat = "0.23.1"
This code snippet allows you to purchase a free ugc limited.
It can be modified to purchase a non-free ugc limited by changing the price.
```rust // Replace this value with your own roblosecurity token. const ROBLOSECURITY: &str = "your-roblosecurity-token"; // Replace this value with the item id of the item you want to purchase. const ITEM_ID: u64 = 13119979433; // Replace this value if you want to purchase a non-free item. const PRICE: u64 = 0;
async fn main() -> Result<(), Box
let collectible_item_id = client.collectible_item_id(ITEM_ID).await?;
let collectible_product_id = client
.collectible_product_id(collectible_item_id.clone())
.await?;
let collectible_creator_id = client
.collectible_creator_id(collectible_item_id.clone())
.await?;
client
.purchase_non_tradable_limited(
collectible_item_id,
collectible_product_id,
collectible_creator_id,
PRICE,
)
.await?;
println!("Purchased item {} for {} robux!", ITEM_ID, PRICE);
Ok(())
} ```
This code snippet allows you to get your current robux, id, username, and display name.
```rust // Replace this value with your own roblosecurity token. const ROBLOSECURITY: &str = "your-roblosecurity-token";
async fn main() -> Result<(), Box
let robux = client.robux().await?;
let user_id = client.user_id().await?;
let username = client.username().await?;
let display_name = client.display_name().await?;
println!("Robux: {}", robux);
println!("User ID: {}", user_id);
println!("Username: {}", username);
println!("Display Name: {}", display_name);
Ok(())
} ```
This code snippet allows you to view the lowest price of a tradable limited item by fetching a list of reseller listings.
```rust // Replace this value with your own roblosecurity token. const ROBLOSECURITY: &str = "your-roblosecurity-token";
async fn main() -> Result<(), Box
let item_id = 1365767;
let limit = roboat::Limit::Ten;
let cursor = None;
let (resellers, _) = client.resellers(item_id, limit, cursor).await?;
println!("Lowest Price for Valkyrie Helm: {}", resellers[0].price);
Ok(())
} ```
This code snippet allows you to get the details of an item.
```rust use roboat::catalog::avatar_catalog::{ItemArgs, ItemType};
async fn main() -> Result<(), Box
let item = ItemArgs {
item_type: ItemType::Asset,
id: 1365767,
};
let details = &client.item_details(vec![item]).await?[0];
let name = &details.name;
let description = &details.description;
let creator_name = &details.creator_name;
let price = details.price.unwrap_or(0);
println!("Name: {}", name);
println!("Description: {}", description);
println!("Creator Name: {}", creator_name);
println!("Price: {}", price);
Ok(())
} ```
More examples can be found in the examples directory.
This crate is a sister crate of roli, an API wrapper for Rolimons.com.
Pull requests and issues are welcome!
Please refer to CONVENTIONS.md for information on conventions used in this crate.
Additional resources used to help make this crate are available in RESOURCES.md.
MIT License