add: profile connections, spotify connection
This commit is contained in:
parent
a5c2356940
commit
33ba576d4a
31 changed files with 931 additions and 19 deletions
1
crates/core/src/database/connections/mod.rs
Normal file
1
crates/core/src/database/connections/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod spotify;
|
21
crates/core/src/database/connections/spotify.rs
Normal file
21
crates/core/src/database/connections/spotify.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
use std::collections::HashMap;
|
||||
use crate::{
|
||||
config::Config,
|
||||
model::auth::{ConnectionType, ExternalConnectionInfo, UserConnections},
|
||||
};
|
||||
|
||||
/// A connection to Spotify.
|
||||
///
|
||||
/// <https://developer.spotify.com/documentation/web-api>
|
||||
pub struct SpotifyConnection(pub UserConnections, pub Config);
|
||||
|
||||
impl SpotifyConnection {
|
||||
/// Create a new [`ExternalConnectionInfo`] for the connection.
|
||||
pub fn connection() -> ExternalConnectionInfo {
|
||||
ExternalConnectionInfo {
|
||||
con_type: ConnectionType::PKCE,
|
||||
data: HashMap::new(),
|
||||
show_on_profile: true,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue