Skip to content

Commit

Permalink
Deprecated Profiles::new in favor of Profiles::new_profile
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed May 22, 2024
1 parent f57b3b9 commit 0f84838
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,16 @@ impl Profiles {
/// Creates a new profile. It is not check if the maximum amount of profiles is already reached.
/// Use [`Profiles::max_profiles`] and the length of [`Profiles::profiles`] to check it
/// manually.
#[allow(clippy::new_ret_no_self)]
#[deprecated(since = "0.11.3", note = "Use `new_profile` instead")]
pub async fn new(&self, profile_name: String, username: String) -> Result<Profile> {
self.new_profile(profile_name, username).await
}

/// Creates a new profile. It is not check if the maximum amount of profiles is already reached.
/// Use [`Profiles::max_profiles`] and the length of [`Profiles::profiles`] to check it
/// manually.
pub async fn new_profile(&self, profile_name: String, username: String) -> Result<Profile> {
let endpoint = "https://www.crunchyroll.com/accounts/v1/me/multiprofile";
self.executor
.post(endpoint)
Expand Down

0 comments on commit 0f84838

Please sign in to comment.