Types

Lyrics

pub struct Lyrics {
    pub total: u64,
    pub took: u64,
    pub data: Vec<LyricsData>
}

LyricsData

pub struct LyricsData {
    pub artist: String,
    pub artist_id: u64,
    pub album: String,
    pub album_ids: String,
    pub album_year: String,
    pub name: String,
    pub lyrics: String,
    pub search_str: String,
    pub album_art: String,
    pub popularity: u64,
    pub singalong: Vec<LyricsSingalong>,
    pub meta: LyricsMeta,
    pub id: String,
    pub search_score: f64,
    pub url: String
}

LyricsSingalong

pub struct LyricsSingalong {
    pub lrc_timestamp: Option<String>,
    pub milliseconds: Option<String>,
    pub duration: Option<String>,
    pub line: Option<String>
}

LyricsMeta

pub struct LyricsMeta {
    pub spotify: SpotifyMeta,
    pub deezer: DeezerMeta,
    pub artists: Option<Vec<ArtistsMeta>>,
    pub other: OtherMeta
}

SpotifyMeta

pub struct SpotifyMeta {
    pub artists: Vec<String>,
    pub track: Option<String>,
    pub album: Option<String>
}

DeezerMeta

pub struct DeezerMeta {
    pub artists: Vec<String>,
    pub track: Option<String>,
    pub album: Option<String>
}

ArtistsMeta

pub struct ArtistsMeta {
    pub name: String,
    pub is_primary: bool,
    pub id: u64
}

OtherMeta

pub struct OtherMeta {
    pub gain: f64,
    pub bpm: f64
}

MusicRecommendations

pub struct MusicRecommendations {
    pub tracks: Vec<String>,
    pub provider: String,
    pub youtube_token: Option<String>,
    pub limit: Option<u32>,
    pub recommend_type: Option<String>,
}

MusicRecommendationsResponse

pub struct MusicRecommendationsResponse {
    pub provider: String,
    pub total: u32,
    pub tracks: Vec<RecommendationTrack>
}

RecommendationTrack

pub struct RecommendationTrack {
    pub youtube: YoutubeTrack,
    pub spotify: SpotifyTrack,
    pub name: String
}

SpotifyTrack

pub struct SpotifyTrack {
    pub id: String,
    pub album: SpotifyAlbum,
    pub artists: Vec<SpotifyArtist>,
    pub name: String,
    pub link: String
}

SpotifyArtist

pub struct SpotifyArtist {
    pub name: String,
    pub link: String
}

SpotifyAlbum

pub struct SpotifyAlbum {
    pub name: String,
    pub album_art: String,
    pub link: String
}

YoutubeTrack

pub struct YoutubeTrack {
    pub id: String,
    pub link: String,
    pub title: String,
    pub thumbnail: String,
    pub description: String,
}

ProviderType

pub enum ProviderType {
    Youtube(Vec<String>),
    YoutubeIDs(Vec<String>),
    YoutubeTitles(Vec<String>),
    SpotifyIDs(Vec<String>)
}

MusicError

pub struct MusicError {
    pub code: u16,
    pub error: bool,
    pub message: String
}

Last updated