Skip to content

Commit

Permalink
rename: endpoints -> clients
Browse files Browse the repository at this point in the history
  • Loading branch information
marioortizmanero committed May 13, 2021
1 parent 1367931 commit 8c016bc
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/auth_code.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
auth_urls,
endpoints::{BaseClient, OAuthClient},
clients::{BaseClient, OAuthClient},
headers,
http::{Form, HttpClient},
ClientResult, Config, Credentials, OAuth, Token,
Expand Down
2 changes: 1 addition & 1 deletion src/auth_code_pkce.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
auth_urls,
endpoints::{BaseClient, OAuthClient},
clients::{BaseClient, OAuthClient},
headers,
http::{Form, HttpClient},
ClientResult, Config, Credentials, OAuth, Token,
Expand Down
4 changes: 2 additions & 2 deletions src/client_creds.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
endpoints::BaseClient,
clients::BaseClient,
headers,
http::{Form, HttpClient},
ClientResult, Config, Credentials, Token,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/base.rs → src/clients/base.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
auth_urls,
endpoints::{
clients::{
basic_auth, bearer_auth, convert_result, join_ids,
pagination::{paginate, Paginator},
},
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/endpoints/oauth.rs → src/clients/oauth.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
endpoints::{
clients::{
append_device_id, convert_result, join_ids,
pagination::{paginate, Paginator},
BaseClient,
Expand All @@ -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)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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`].
///
Expand Down

0 comments on commit 8c016bc

Please sign in to comment.