Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Restriction #62

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
79 changes: 78 additions & 1 deletion Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rbxcloud"
version = "0.14.0"
version = "0.15.0"
description = "CLI and SDK for the Roblox Open Cloud APIs"
authors = ["Stephen Leitnick"]
license = "MIT"
Expand All @@ -18,3 +18,4 @@ 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 = "0.4.38"
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 (Beta) |
| -- | -- |
| :x: | Data Stores |
| :white_check_mark: | Groups |
| :white_check_mark: | Universes |
| :white_check_mark: | Places |
Expand All @@ -33,6 +34,7 @@ Possible use-cases:
| :x: | Inventory |
| :white_check_mark: | User Notifications |
| :white_check_mark: | User |
| :white_check_mark: | User Restrictions |
| :x: | Creator Store |

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

use clap::{Parser, Subcommand};
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 @@ -22,13 +24,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 @@ -61,10 +63,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 @@ -77,6 +82,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