import { getAxiosSpotifyInstance } from './driver' ; import { Artist , Page , Track } from './models' ; export const getCurrentUserTopArtists = async ( params ? ) : Promise < Page < Artist > > => { const response = await getAxiosSpotifyInstance ( ) . get ( 'https://api.spotify.com/v1/me/top/artists' , { params } ) ; return new Page < Artist > ( response . data , Artist ) ; } ; export const getCurrentUserTopTracks = async ( params ? ) : Promise < Page < Track > > => { const response = await getAxiosSpotifyInstance ( ) . get ( 'https://api.spotify.com/v1/me/top/tracks' , { params } ) ; return new Page < Track > ( response . data , Track ) ; } ;