itunes-web-api
Advanced tools
Comparing version 2.1.0 to 2.1.1
export declare type entity = "movie" | "album" | "allArtist" | "podcast" | "musicVideo" | "mix" | "audiobook" | "tvSeason" | "allTrack"; | ||
export declare type attribute = "actorTerm" | "languageTerm" | "allArtistTerm" | "tvEpisodeTerm" | "shortFilmTerm" | "directorTerm" | "releaseYearTerm" | "titleTerm" | "featureFilmTerm" | "ratingIndex" | "keywordsTerm" | "descriptionTerm" | "authorTerm" | "genreIndex" | "mixTerm" | "allTrackTerm" | "artistTerm" | "composerTerm" | "tvSeasonTerm" | "producerTerm" | "ratingTerm" | "songTerm" | "movieArtistTerm" | "showTerm" | "movieTerm" | "albumTerm"; | ||
export interface options { | ||
limit: number; | ||
limit?: number; | ||
language?: string; | ||
@@ -6,0 +6,0 @@ country?: string; |
@@ -10,3 +10,3 @@ "use strict"; | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&media=music&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&media=music&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -22,3 +22,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&media=musicVideo&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&media=musicVideo&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -34,3 +34,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=allArtist&attribute=allArtistTerm&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=allArtist&attribute=allArtistTerm&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -46,3 +46,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=album&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=album&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -58,3 +58,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=software&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=software&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -70,3 +70,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=movie&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=movie&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -82,3 +82,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=ebook&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=ebook&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -94,3 +94,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=audiobook&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=audiobook&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -106,3 +106,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=podcast&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=podcast&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -118,3 +118,3 @@ } | ||
try { | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURI(name)}&entity=${entity}&attribute=${attribute}&limit=${options?.limit ?? "1"}&lang=${options?.language ?? "en"}&country=${options?.country ?? "US"}`); | ||
const res = await (0, node_fetch_1.default)(`https://itunes.apple.com/search?term=${encodeURIComponent(name)}&entity=${entity}&attribute=${attribute}&limit=${options.limit ?? "1"}&lang=${options.language ?? "en"}&country=${options.country ?? "US"}`); | ||
return (await res.json()); | ||
@@ -121,0 +121,0 @@ } |
{ | ||
"name": "itunes-web-api", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "iTunes Web API Scrapper. Get iTunes track/trackvideo/artist/album/movie/app/book/voicebook/podcast infos with their names.", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"node-fetch": "^3.0.0" | ||
"node-fetch": "^2.6.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20453
0
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removeddata-uri-to-buffer@4.0.1(transitive)
- Removedfetch-blob@3.2.0(transitive)
- Removedformdata-polyfill@4.0.10(transitive)
- Removednode-domexception@1.0.0(transitive)
- Removednode-fetch@3.3.2(transitive)
- Removedweb-streams-polyfill@3.3.3(transitive)
Updatednode-fetch@^2.6.1