Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 186 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ reqwest = { version = "0.12.2", default-features = false, features = ["rustls-tl
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.115"
tokio = { version = "1.36.0", features = ["full"] }
chrono = { version = "0.4.38", features = ["serde"] }
rand = "0.9.0"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Possible use-cases:

| | API v2 |
| -- | -- |
| :x: | Data Stores |
| :white_check_mark: | Groups |
| :white_check_mark: | Universes |
| :white_check_mark: | Places |
Expand All @@ -33,6 +34,7 @@ Possible use-cases:
| :white_check_mark: | Inventory |
| :white_check_mark: | User Notifications |
| :white_check_mark: | User |
| :white_check_mark: | User Restrictions |
| :x: | Creator Store |
| :white_check_mark: | Luau Execution |

Expand Down
12 changes: 9 additions & 3 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ mod place_cli;
mod subscription_cli;
mod universe_cli;
mod user_cli;
mod user_restriction_cli;

use clap::{Parser, Subcommand};
use inventory_cli::Inventory;
use luau_execution_cli::Luau;
use universe_cli::Universe;
use user_cli::User;
use user_restriction_cli::UserRestriction;

use self::{
assets_cli::Assets, datastore_cli::DataStore, experience_cli::Experience, group_cli::Group,
Expand All @@ -26,13 +28,13 @@ use self::{

#[derive(Debug, Parser)]
#[clap(name = "rbxcloud", version)]
pub struct Cli {
pub(crate) struct Cli {
#[clap(subcommand)]
pub command: Command,
}

#[derive(Debug, Subcommand)]
pub enum Command {
pub(crate) enum Command {
/// Access the Roblox Assets API
Assets(Assets),

Expand Down Expand Up @@ -70,10 +72,13 @@ pub enum Command {

/// Access the Roblox User API
User(User),

/// Access to the Roblox User Restriction API
UserRestriction(UserRestriction),
}

impl Cli {
pub async fn run(self) -> anyhow::Result<Option<String>> {
pub(crate) async fn run(self) -> anyhow::Result<Option<String>> {
match self.command {
Command::Assets(command) => command.run().await,
Command::Experience(command) => command.run().await,
Expand All @@ -88,6 +93,7 @@ impl Cli {
Command::Place(command) => command.run().await,
Command::Universe(command) => command.run().await,
Command::User(command) => command.run().await,
Command::UserRestriction(command) => command.run().await,
}
}
}
Loading