Skip to content

Commit

Permalink
Almost there
Browse files Browse the repository at this point in the history
  • Loading branch information
marioortizmanero committed May 27, 2022
1 parent 243af5e commit a08da06
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 230 deletions.
8 changes: 4 additions & 4 deletions rspotify-model/src/album.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use serde::{Deserialize, Serialize};
use std::collections::HashMap;

use crate::{
AlbumIdBuf, AlbumType, Copyright, DatePrecision, Image, Page, RestrictionReason,
SimplifiedArtist, SimplifiedTrack,
AlbumId, AlbumType, Copyright, DatePrecision, Image, Page, RestrictionReason, SimplifiedArtist,
SimplifiedTrack,
};

/// Simplified Album Object
Expand All @@ -21,7 +21,7 @@ pub struct SimplifiedAlbum {
pub available_markets: Vec<String>,
pub external_urls: HashMap<String, String>,
pub href: Option<String>,
pub id: Option<AlbumIdBuf>,
pub id: Option<AlbumId<'static>>,
pub images: Vec<Image>,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -43,7 +43,7 @@ pub struct FullAlbum {
pub external_urls: HashMap<String, String>,
pub genres: Vec<String>,
pub href: String,
pub id: AlbumIdBuf,
pub id: AlbumId<'static>,
pub images: Vec<Image>,
pub name: String,
pub popularity: u32,
Expand Down
6 changes: 3 additions & 3 deletions rspotify-model/src/artist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ use serde::{Deserialize, Serialize};

use std::collections::HashMap;

use crate::{ArtistIdBuf, CursorBasedPage, Followers, Image};
use crate::{ArtistId, CursorBasedPage, Followers, Image};

/// Simplified Artist Object
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Default)]
pub struct SimplifiedArtist {
pub external_urls: HashMap<String, String>,
pub href: Option<String>,
pub id: Option<ArtistIdBuf>,
pub id: Option<ArtistId<'static>>,
pub name: String,
}

Expand All @@ -22,7 +22,7 @@ pub struct FullArtist {
pub followers: Followers,
pub genres: Vec<String>,
pub href: String,
pub id: ArtistIdBuf,
pub id: ArtistId<'static>,
pub images: Vec<Image>,
pub name: String,
pub popularity: u32,
Expand Down
4 changes: 2 additions & 2 deletions rspotify-model/src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::time::Duration;

use crate::{
custom_serde::{duration_ms, modality},
Modality, TrackIdBuf,
Modality, TrackId,
};

/// Audio Feature Object
Expand All @@ -18,7 +18,7 @@ pub struct AudioFeatures {
#[serde(with = "duration_ms", rename = "duration_ms")]
pub duration: Duration,
pub energy: f32,
pub id: TrackIdBuf,
pub id: TrackId<'static>,
pub instrumentalness: f32,
pub key: i32,
pub liveness: f32,
Expand Down
Loading

0 comments on commit a08da06

Please sign in to comment.