diff --git a/Cargo.lock b/Cargo.lock index a075603..4af62fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -581,7 +581,7 @@ dependencies = [ [[package]] name = "robotevents" -version = "0.1.0" +version = "0.2.0" dependencies = [ "itertools", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index 63e8b72..fea3239 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "Wrapper for the RobotEvents.com v2 API." repository = "https://github.com/LemLib/robotevents-rs/" license-file = "LICENSE.md" readme = "README.md" -version = "0.1.0" +version = "0.2.0" edition = "2021" authors=["tropix126", "BattleCh1cken"] categories = ["science::robotics", "api-bindings", "web-programming::http-client"] diff --git a/src/client.rs b/src/client.rs index bbe7260..1660ebb 100644 --- a/src/client.rs +++ b/src/client.rs @@ -17,6 +17,10 @@ pub const V1_API_BASE: &str = "https://www.robotevents.com/api/v1"; pub const V2_API_BASE: &str = "https://www.robotevents.com/api/v2"; impl RobotEvents { + /// Create a new RobotEvents API client. + /// + /// A bearer authentication token is required for requests to be made. This can + /// be obtained from RobotEvents by creating an account and requesting one. pub fn new(bearer_token: impl AsRef) -> Self { Self { bearer_token: bearer_token.as_ref().to_owned(), @@ -24,10 +28,8 @@ impl RobotEvents { } } - /// Make a request to a [RobotEvents API v2](https://www.robotevents.com/api/v2) endpoint. - /// - /// Requires a bearer authentication token to be provided for requests to work. This can - /// be obtained from RobotEvents by creating an account and requesting one. + /// Make a request to a [RobotEvents API v2](https://www.robotevents.com/api/v2) endpoint using the + /// client's bearer token. pub async fn request( &self, endpoint: impl AsRef, diff --git a/src/schema/season.rs b/src/schema/season.rs index 0980951..e1638c2 100644 --- a/src/schema/season.rs +++ b/src/schema/season.rs @@ -23,4 +23,4 @@ impl Season { .json() .await?) } -} +} \ No newline at end of file