Skip to content

Commit 20f5a6c

Browse files
committed
update some doc comments
1 parent cd4df91 commit 20f5a6c

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Wrapper for the RobotEvents.com v2 API."
44
repository = "https://github.com/LemLib/robotevents-rs/"
55
license-file = "LICENSE.md"
66
readme = "README.md"
7-
version = "0.1.0"
7+
version = "0.2.0"
88
edition = "2021"
99
authors=["tropix126", "BattleCh1cken"]
1010
categories = ["science::robotics", "api-bindings", "web-programming::http-client"]

src/client.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ pub const V1_API_BASE: &str = "https://www.robotevents.com/api/v1";
1717
pub const V2_API_BASE: &str = "https://www.robotevents.com/api/v2";
1818

1919
impl RobotEvents {
20+
/// Create a new RobotEvents API client.
21+
///
22+
/// A bearer authentication token is required for requests to be made. This can
23+
/// be obtained from RobotEvents by creating an account and requesting one.
2024
pub fn new(bearer_token: impl AsRef<str>) -> Self {
2125
Self {
2226
bearer_token: bearer_token.as_ref().to_owned(),
2327
req_client: reqwest::Client::new(),
2428
}
2529
}
2630

27-
/// Make a request to a [RobotEvents API v2](https://www.robotevents.com/api/v2) endpoint.
28-
///
29-
/// Requires a bearer authentication token to be provided for requests to work. This can
30-
/// be obtained from RobotEvents by creating an account and requesting one.
31+
/// Make a request to a [RobotEvents API v2](https://www.robotevents.com/api/v2) endpoint using the
32+
/// client's bearer token.
3133
pub async fn request(
3234
&self,
3335
endpoint: impl AsRef<str>,

src/schema/season.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ impl Season {
2323
.json()
2424
.await?)
2525
}
26-
}
26+
}

0 commit comments

Comments
 (0)