Skip to content

Commit

Permalink
Merge pull request #37 from Chloe-Woahie/dev-main
Browse files Browse the repository at this point in the history
v0.14.0
  • Loading branch information
fekie authored Apr 10, 2023
2 parents 5807319 + b0b792d commit 4130409
Show file tree
Hide file tree
Showing 10 changed files with 487 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
name = "roboat"
readme = "README.md"
repository = "https://github.com/Chloe-Woahie/roboat"
version = "0.13.0"
version = "0.14.0"

[dependencies]
reqwest = { version = "0.11.14", default-features=false, features = ["rustls-tls", "json"] }
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Documentation can be found [here](https://docs.rs/roboat/).
- Register Presence - [`Client::register_presence`](https://docs.rs/roboat/latest/roboat/struct.Client.html#method.register_presence)
* Trades API - [`trades.roblox.com/*`]
- Fetch Trades List - [`Client::trades`](https://docs.rs/roboat/latest/roboat/struct.Client.html#method.trades)
* Apis API (Roblox named this, not me) - [`apis.roblox.com/*`]
- Fetch Non-Tradable Limited Details - [`Client::non_tradable_limited_details`](https://docs.rs/roboat/latest/roboat/struct.Client.html#method.non_tradable_limited_details)
- Fetch Collectible Product ID - [`Client::collectible_product_id`](https://docs.rs/roboat/latest/roboat/struct.Client.html#method.collectible_product_id)
- Fetch Collectible Product ID Bulk - [`Client::collectible_product_id_bulk`](https://docs.rs/roboat/latest/roboat/struct.Client.html#method.collectible_product_id_bulk)

# Setup
You can add the latest version of roboat to your project by running:
Expand All @@ -54,7 +58,7 @@ Alternatively, you can add a specific version of roboat to your project by addin

```toml
[dependencies]
roboat = "0.13.0"
roboat = "0.14.0"
```

# Quick Start Examples
Expand Down
26 changes: 26 additions & 0 deletions examples/get_collectible_product_id.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use roboat::ClientBuilder;

use clap::Parser;

#[derive(Parser, Debug)]
struct Args {
#[arg(long, short)]
roblosecurity: String,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();

let collectible_item_id = "61f2e366-9fe6-4562-8ce3-47334083372a".to_owned();

let client = ClientBuilder::new()
.roblosecurity(args.roblosecurity)
.build();

let collectible_product_id = client.collectible_product_id(collectible_item_id).await?;

println!("Collectible Product ID: {}", collectible_product_id);

Ok(())
}
31 changes: 31 additions & 0 deletions examples/get_collectible_product_ids_bulk.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
use roboat::ClientBuilder;

use clap::Parser;

#[derive(Parser, Debug)]
struct Args {
#[arg(long, short)]
roblosecurity: String,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();

let collectible_item_id_1 = "a4b5cb79-5218-4ca1-93fa-1e3436f595ef".to_owned();
let collectible_item_id_2 = "61f2e366-9fe6-4562-8ce3-47334083372a".to_owned();

let items = vec![collectible_item_id_1, collectible_item_id_2];

let client = ClientBuilder::new()
.roblosecurity(args.roblosecurity)
.build();

let collectible_product_ids = client.collectible_product_id_bulk(items).await?;

for collectible_product_id in collectible_product_ids {
println!("Collectible Product ID: {}", collectible_product_id);
}

Ok(())
}
29 changes: 29 additions & 0 deletions examples/get_non_tradable_limited_details.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use roboat::ClientBuilder;

use clap::Parser;

#[derive(Parser, Debug)]
struct Args {
#[arg(long, short)]
roblosecurity: String,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();

let collectible_item_id_1 = "a4b5cb79-5218-4ca1-93fa-1e3436f595ef".to_owned();
let collectible_item_id_2 = "61f2e366-9fe6-4562-8ce3-47334083372a".to_owned();

let items = vec![collectible_item_id_1, collectible_item_id_2];

let client = ClientBuilder::new()
.roblosecurity(args.roblosecurity)
.build();

let details = client.non_tradable_limited_details(items).await?;

dbg!(details);

Ok(())
}
Loading

0 comments on commit 4130409

Please sign in to comment.