Skip to content

Commit

Permalink
Merge pull request #46 from Chloe-Woahie/dev-main
Browse files Browse the repository at this point in the history
v0.20.1
  • Loading branch information
fekie authored May 10, 2023
2 parents 53e972b + 5f0fb68 commit 0d142f3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 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.20.0"
version = "0.20.1"

[dependencies]
reqwest = { version = "0.11.14", default-features=false, features = ["rustls-tls", "json"] }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Alternatively, you can add a specific version of roboat to your project by addin

```toml
[dependencies]
roboat = "0.20.0"
roboat = "0.20.1"
```

# Quick Start Examples
Expand Down
8 changes: 4 additions & 4 deletions examples/fetch_group_role_members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

next_cursor = cursor;

if next_cursor.is_none() {
break;
}

println!("Page {} of Members:", i);

for member in members {
Expand All @@ -36,6 +32,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
member.user_id, member.username, member.display_name
);
}

if next_cursor.is_none() {
break;
}
}

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use reqwest::header;
const AUTH_BASE_URL: &str = "https://auth.roblox.com/";

impl Client {
/// Used to force refresh the xcsrf. This does not invalid the current xcsrf, it just
/// Used to force refresh the xcsrf. This does not invalidate the current xcsrf, it just
/// makes sure that the current xcsrf is valid and adds a new one if it is not.
///
/// Uses the endpoint <https://auth.roblox.com/>
Expand Down
7 changes: 4 additions & 3 deletions src/groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const GROUP_ROLES_API: &str = "https://groups.roblox.com/v1/groups/{group_id}/ro

const GROUP_ROLE_MEMBERS_SORT_ORDER: &str = "Desc";
const GROUP_ROLE_MEMBERS_API: &str =
"https://groups.roblox.com/v1/groups/{group_id}/roles/{role_id}/users?cursor={cursor_id}&limit={limit}&sortOrder={sort_order}";
"https://groups.roblox.com/v1/groups/{group_id}/roles/{role_id}/users?cursor={cursor}&limit={limit}&sortOrder={sort_order}";

const CHANGE_GROUP_MEMBER_ROLE_API: &str =
"https://groups.roblox.com/v1/groups/{group_id}/users/{user_id}";
Expand All @@ -33,6 +33,7 @@ impl Client {
/// # Notes
/// * Does not require a valid roblosecurity.
/// * Returns roles in ascending order by rank.
/// * Does not appear to have a rate limit.
///
/// # Errors
/// * All errors under [Standard Errors](#standard-errors).
Expand Down Expand Up @@ -78,7 +79,7 @@ impl Client {
}

/// Returns a page of members of a group role using
/// <https://groups.roblox.com/v1/groups/{group_id}/roles/{role_id}/users?cursor={cursor_id}&limit={limit}&sortOrder={sort_order}>.
/// <https://groups.roblox.com/v1/groups/{group_id}/roles/{role_id}/users?cursor={cursor}&limit={limit}&sortOrder=Desc>.
///
/// # Notes
/// * Does not require a valid roblosecurity.
Expand Down Expand Up @@ -123,7 +124,7 @@ impl Client {
let formatted_url = GROUP_ROLE_MEMBERS_API
.replace("{group_id}", &group_id.to_string())
.replace("{role_id}", &role_id.to_string())
.replace("{cursor_id}", &cursor.unwrap_or_default())
.replace("{cursor}", &cursor.unwrap_or_default())
.replace("{limit}", &limit.to_u64().to_string())
.replace("{sort_order}", GROUP_ROLE_MEMBERS_SORT_ORDER);

Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ pub mod users;
/// A module related to validating requests.
mod validation;

// todo: add manual xcsrf refresh
// todo: endpoints that require premium/robux to test: recent trades, send trade, buy limited item, buy non-limited item
// todo: inventory api, groups api, follow api
// todo: add usage to readme
Expand Down

0 comments on commit 0d142f3

Please sign in to comment.