add: profile connections, spotify connection

This commit is contained in:
trisua 2025-04-26 16:27:18 -04:00
parent a5c2356940
commit 33ba576d4a
31 changed files with 931 additions and 19 deletions

View file

@ -0,0 +1 @@
pub mod spotify;

View 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,
}
}
}