         static let searchTypes = "types"
 
         // Fetch
-        // TODO: Construct this from the media type
-        static let artistPath = "v1/catalog/{storefront}/artists/{id}"
-        static let albumsPath = "v1/catalog/{storefront}/albums/{id}"
-        static let songsPath = "v1/catalog/{storefront}/songs/{id}"
-        static let playlistsPath = "v1/catalog/{storefront}/playlists/{id}"
-        static let musicVideosPath = "v1/catalog/{storefront}/music-videos/{id}"
+        static let fetchPath = "v1/catalog/{storefront}/{mediaType}/{id}"
     }
 
     private var baseApiUrl: URL {


    private func fetchURL(mediaType: MediaType, id: String, include: [Include]? = nil) -> URL {
        var components = URLComponents()
        var fetchPath: String

        switch mediaType {
        case .artists: fetchPath = AppleMusicApi.artistPath
        case .albums: fetchPath = AppleMusicApi.albumsPath
        case .songs: fetchPath = AppleMusicApi.songsPath
        case .playlists: fetchPath = AppleMusicApi.playlistsPath
        case .musicVideos: fetchPath = AppleMusicApi.musicVideosPath
        }

        // Include
        if let include = include {


private extension String {
    func replaceSpacesWithPluses() -> String {
        return replacingOccurrences(of: " ", with: "+")
    }

    func addStorefront(_ storefront: Storefront) -> String {
        return replacingOccurrences(of: "{storefront}", with: storefront.rawValue)
    }

    func addId(_ id: String) -> String {
        return replacingOccurrences(of: "{id}", with: id)
    }

    func addMediaType(_ mediaType: MediaType) -> String {
        return replacingOccurrences(of: "{mediaType}", with: mediaType.rawValue)
    }
}
