-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from fekie/dev-main
Dev main
- Loading branch information
Showing
10 changed files
with
292 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use clap::Parser; | ||
use roboat::ClientBuilder; | ||
|
||
#[derive(Parser, Debug)] | ||
struct Args { | ||
#[arg(long, short)] | ||
roblosecurity: String, | ||
#[arg(long, short)] | ||
group_id: u64, | ||
#[arg(long, short)] | ||
name: String, | ||
#[arg(long, short)] | ||
description: String, | ||
#[arg(long, short)] | ||
image_path: String, | ||
} | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let args = Args::parse(); | ||
let client = ClientBuilder::new() | ||
.roblosecurity(args.roblosecurity) | ||
.build(); | ||
|
||
let classic_clothing_type = roboat::bedev2::ClassicClothingType::Shirt; | ||
|
||
let result = client | ||
.upload_classic_clothing_to_group( | ||
args.group_id, | ||
args.name, | ||
args.description, | ||
args.image_path, | ||
classic_clothing_type, | ||
) | ||
.await; | ||
|
||
match result { | ||
Ok(()) => println!("Uploaded shirt successfully."), | ||
Err(e) => println!("Failed to upload shirt. Reason: {}", e), | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.