speedrun_api/api/
profile.rs

1//! # Profile
2//!
3//! Endpoints available for the current user's profile.
4
5use super::endpoint::Endpoint;
6
7/// Retrieves the user resourcce for the currently authenticated user.
8#[derive(Default, Debug, Builder, Clone)]
9#[builder(default, setter(into, strip_option))]
10pub struct Profile {}
11
12impl Profile {
13    /// Create a builder for this endpoint.
14    pub fn builder() -> ProfileBuilder {
15        ProfileBuilder::default()
16    }
17}
18
19impl Endpoint for Profile {
20    fn endpoint(&self) -> std::borrow::Cow<'static, str> {
21        "/profile".into()
22    }
23
24    fn requires_authentication(&self) -> bool {
25        true
26    }
27}