diff --git a/src/auth_code.rs b/src/auth_code.rs index d3486e4e..b37122f2 100644 --- a/src/auth_code.rs +++ b/src/auth_code.rs @@ -1,6 +1,6 @@ use crate::{ auth_urls, - endpoints::{BaseClient, OAuthClient}, + clients::{BaseClient, OAuthClient}, headers, http::{Form, HttpClient}, ClientResult, Config, Credentials, OAuth, Token, diff --git a/src/auth_code_pkce.rs b/src/auth_code_pkce.rs index 24806ec9..23b03024 100644 --- a/src/auth_code_pkce.rs +++ b/src/auth_code_pkce.rs @@ -1,6 +1,6 @@ use crate::{ auth_urls, - endpoints::{BaseClient, OAuthClient}, + clients::{BaseClient, OAuthClient}, headers, http::{Form, HttpClient}, ClientResult, Config, Credentials, OAuth, Token, diff --git a/src/client_creds.rs b/src/client_creds.rs index db0b1632..602e06a2 100644 --- a/src/client_creds.rs +++ b/src/client_creds.rs @@ -1,5 +1,5 @@ use crate::{ - endpoints::BaseClient, + clients::BaseClient, headers, http::{Form, HttpClient}, ClientResult, Config, Credentials, Token, @@ -15,7 +15,7 @@ use maybe_async::maybe_async; /// /// Note: This flow does not include authorization and therefore cannot be used /// to access or to manage the endpoints related to user private data in -/// [`OAuthClient`](crate::endpoints::OAuthClient). +/// [`OAuthClient`](crate::clients::OAuthClient). /// /// [reference]: https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow /// [example-main]: https://github.com/ramsayleung/rspotify/blob/master/examples/client_creds.rs diff --git a/src/endpoints/base.rs b/src/clients/base.rs similarity index 99% rename from src/endpoints/base.rs rename to src/clients/base.rs index e8953a9f..d711358c 100644 --- a/src/endpoints/base.rs +++ b/src/clients/base.rs @@ -1,6 +1,6 @@ use crate::{ auth_urls, - endpoints::{ + clients::{ basic_auth, bearer_auth, convert_result, join_ids, pagination::{paginate, Paginator}, }, diff --git a/src/endpoints/mod.rs b/src/clients/mod.rs similarity index 100% rename from src/endpoints/mod.rs rename to src/clients/mod.rs diff --git a/src/endpoints/oauth.rs b/src/clients/oauth.rs similarity index 99% rename from src/endpoints/oauth.rs rename to src/clients/oauth.rs index 2a1cb466..8086346a 100644 --- a/src/endpoints/oauth.rs +++ b/src/clients/oauth.rs @@ -1,5 +1,5 @@ use crate::{ - endpoints::{ + clients::{ append_device_id, convert_result, join_ids, pagination::{paginate, Paginator}, BaseClient, @@ -22,9 +22,9 @@ use url::Url; /// authorization, including some parts of the authentication flow that are /// shared, and the endpoints. /// -/// Note that the base trait [`BaseClient`](crate::endpoints::BaseClient) may +/// Note that the base trait [`BaseClient`](crate::clients::BaseClient) may /// have endpoints that conditionally require authorization like -/// [`user_playlist`](crate::endpoints::BaseClient::user_playlist). This trait +/// [`user_playlist`](crate::clients::BaseClient::user_playlist). This trait /// only separates endpoints that *always* need authorization from the base /// ones. #[maybe_async(?Send)] diff --git a/src/endpoints/pagination/iter.rs b/src/clients/pagination/iter.rs similarity index 100% rename from src/endpoints/pagination/iter.rs rename to src/clients/pagination/iter.rs diff --git a/src/endpoints/pagination/mod.rs b/src/clients/pagination/mod.rs similarity index 100% rename from src/endpoints/pagination/mod.rs rename to src/clients/pagination/mod.rs diff --git a/src/endpoints/pagination/stream.rs b/src/clients/pagination/stream.rs similarity index 100% rename from src/endpoints/pagination/stream.rs rename to src/clients/pagination/stream.rs diff --git a/src/lib.rs b/src/lib.rs index 68bd1359..4acf12e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,8 +83,8 @@ //! //! Rspotify has a different client for each of the available authentication //! flows. They may implement the endpoints in -//! [`BaseClient`](crate::endpoints::BaseClient) or -//! [`OAuthClient`](crate::endpoints::OAuthClient) according to what kind of +//! [`BaseClient`](crate::clients::BaseClient) or +//! [`OAuthClient`](crate::clients::OAuthClient) according to what kind of //! flow it is. Please refer to their documentation for more details: //! //! * [Client Credentials Flow](spotify-client-creds): see @@ -125,7 +125,7 @@ pub mod client_creds; pub mod auth_code; pub mod auth_code_pkce; -pub mod endpoints; +pub mod clients; // Subcrate re-exports pub use rspotify_http as http; @@ -151,7 +151,7 @@ use serde::{Deserialize, Serialize}; use thiserror::Error; pub mod prelude { - pub use crate::endpoints::{BaseClient, OAuthClient}; + pub use crate::clients::{BaseClient, OAuthClient}; } pub(in crate) mod headers { @@ -219,7 +219,7 @@ pub struct Config { pub cache_path: PathBuf, /// The pagination chunk size used when performing automatically paginated - /// requests, like [`artist_albums`](crate::endpoints::BaseClient). This + /// requests, like [`artist_albums`](crate::clients::BaseClient). This /// means that a request will be performed every `pagination_chunks` items. /// By default this is [`DEFAULT_PAGINATION_CHUNKS`]. ///