New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

itunes-web-api

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itunes-web-api - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

8

package.json
{
"name": "itunes-web-api",
"version": "2.0.4",
"version": "2.0.5",
"description": "iTunes Web API Scrapper. Get iTunes track/trackvideo/artist/album/movie/app/book/voicebook/podcast infos with their names.",

@@ -16,4 +16,2 @@ "main": "dist",

"format": "prettier --write .",
"start": "node dist/index.js",
"dev": "nodemon index.ts",
"build": "tsc",

@@ -30,3 +28,5 @@ "preinstall": "tsc"

"dependencies": {
"node-fetch": "^2.6.1"
"node-fetch": "^2.6.1",
"prettier": "^2.3.2",
"typescript": "^4.4.2"
},

@@ -33,0 +33,0 @@ "devDependencies": {

@@ -0,0 +0,0 @@ ## WELCOME TO ITUNES WEB API!

"use strict";
export interface options {
limit: number;
language?: string;
country?: string;
}
export type entity =

@@ -48,5 +42,323 @@ | "movie"

export type ReturnTypes = {
export interface options {
limit: number;
language?: string;
country?: string;
}
export interface MusicResult {
wrapperType: string;
kind: string;
artistId: number;
collectionId: number;
trackId: number;
artistName: string;
collectionName: string;
trackName: string;
collectionCensoredName: string;
trackCensoredName: string;
artistViewUrl: string;
collectionViewUrl: string;
trackViewUrl: string;
previewUrl: string;
artworkUrl30: string;
artworkUrl60: string;
artworkUrl100: string;
collectionPrice: number;
trackPrice: number;
releaseDate: Date;
collectionExplicitness: string;
trackExplicitness: string;
discCount: number;
discNumber: number;
trackCount: number;
trackNumber: number;
trackTimeMillis: number;
country: string;
currency: string;
primaryGenreName: string;
contentAdvisoryRating: string;
isStreamable: boolean;
}
export interface MusicVideoResult {
wrapperType: string;
kind: string;
artistId: number;
trackId: number;
artistName: string;
trackName: string;
trackCensoredName: string;
artistViewUrl: string;
trackViewUrl: string;
previewUrl: string;
artworkUrl30: string;
artworkUrl60: string;
artworkUrl100: string;
collectionPrice: number;
trackPrice: number;
releaseDate: Date;
collectionExplicitness: string;
trackExplicitness: string;
trackTimeMillis: number;
country: string;
currency: string;
primaryGenreName: string;
contentAdvisoryRating: string;
}
export interface ArtistResult {
wrapperType: string;
artistType: string;
artistName: string;
artistLinkUrl: string;
artistId: number;
primaryGenreName: string;
primaryGenreId: number;
}
export interface AlbumResult {
wrapperType: string;
collectionType: string;
artistId: number;
collectionId: number;
amgArtistId: number;
artistName: string;
collectionName: string;
collectionCensoredName: string;
artistViewUrl: string;
collectionViewUrl: string;
artworkUrl60: string;
artworkUrl100: string;
collectionPrice: number;
collectionExplicitness: string;
contentAdvisoryRating: string;
trackCount: number;
copyright: string;
country: string;
currency: string;
releaseDate: Date;
primaryGenreName: string;
}
export interface SoftwareResult {
screenshotUrls: string[];
ipadScreenshotUrls: string[];
appletvScreenshotUrls: any[];
artworkUrl60: string;
artworkUrl512: string;
artworkUrl100: string;
artistViewUrl: string;
supportedDevices: string[];
advisories: string[];
isGameCenterEnabled: boolean;
features: string[];
kind: string;
minimumOsVersion: string;
trackCensoredName: string;
languageCodesISO2A: string[];
fileSizeBytes: string;
sellerUrl: string;
formattedPrice: string;
contentAdvisoryRating: string;
averageUserRatingForCurrentVersion: number;
userRatingCountForCurrentVersion: number;
averageUserRating: number;
trackViewUrl: string;
trackContentRating: string;
trackId: number;
trackName: string;
genreIds: string[];
releaseDate: Date;
sellerName: string;
primaryGenreName: string;
isVppDeviceBasedLicensingEnabled: boolean;
currentVersionReleaseDate: Date;
releaseNotes: string;
primaryGenreId: number;
currency: string;
description: string;
artistId: number;
artistName: string;
genres: string[];
price: number;
bundleId: string;
version: string;
wrapperType: string;
userRatingCount: number;
}
export interface MovieResult {
wrapperType: string;
kind: string;
collectionId: number;
trackId: number;
artistName: string;
collectionName: string;
trackName: string;
collectionCensoredName: string;
trackCensoredName: string;
collectionArtistId: number;
collectionArtistViewUrl: string;
collectionViewUrl: string;
trackViewUrl: string;
previewUrl: string;
artworkUrl30: string;
artworkUrl60: string;
artworkUrl100: string;
collectionPrice: number;
trackPrice: number;
trackRentalPrice: number;
collectionHdPrice: number;
trackHdPrice: number;
trackHdRentalPrice: number;
releaseDate: Date;
collectionExplicitness: string;
trackExplicitness: string;
discCount: number;
discNumber: number;
trackCount: number;
trackNumber: number;
trackTimeMillis: number;
country: string;
currency: string;
primaryGenreName: string;
contentAdvisoryRating: string;
shortDescription: string;
longDescription: string;
hasITunesExtras: boolean;
}
export interface EbookResult {
artworkUrl60: string;
artworkUrl100: string;
artistViewUrl: string;
trackCensoredName: string;
fileSizeBytes: number;
formattedPrice: string;
trackViewUrl: string;
artistIds: number[];
genreIds: string[];
releaseDate: Date;
currency: string;
description: string;
artistId: number;
artistName: string;
genres: string[];
price: number;
trackId: number;
trackName: string;
kind: string;
averageUserRating: number;
userRatingCount: number;
}
export interface VoiceBookResult {
artworkUrl60: string;
artworkUrl100: string;
artistViewUrl: string;
trackCensoredName: string;
fileSizeBytes: number;
formattedPrice: string;
trackViewUrl: string;
artistIds: number[];
genreIds: string[];
releaseDate: Date;
currency: string;
description: string;
artistId: number;
artistName: string;
genres: string[];
price: number;
trackId: number;
trackName: string;
kind: string;
averageUserRating: number;
userRatingCount: number;
}
export interface PodcastResult {
wrapperType: string;
kind: string;
artistId: number;
collectionId: number;
trackId: number;
artistName: string;
collectionName: string;
trackName: string;
collectionCensoredName: string;
trackCensoredName: string;
artistViewUrl: string;
collectionViewUrl: string;
feedUrl: string;
trackViewUrl: string;
artworkUrl30: string;
artworkUrl60: string;
artworkUrl100: string;
collectionPrice: number;
trackPrice: number;
trackRentalPrice: number;
collectionHdPrice: number;
trackHdPrice: number;
trackHdRentalPrice: number;
releaseDate: Date;
collectionExplicitness: string;
trackExplicitness: string;
trackCount: number;
country: string;
currency: string;
primaryGenreName: string;
artworkUrl600: string;
genreIds: string[];
genres: string[];
}
export type MusicReturn = {
resultCount: number;
results: MusicResult[];
};
export type MusicVideoReturn = {
resultCount: number;
results: MusicVideoResult[];
};
export type ArtistReturn = {
resultCount: number;
results: ArtistResult[];
};
export type AlbumReturn = {
resultCount: number;
results: AlbumResult[];
};
export type SoftwareReturn = {
resultCount: number;
results: SoftwareResult[];
};
export type MovieReturn = {
resultCount: number;
results: MovieResult[];
};
export type EbookReturn = {
resultCount: number;
results: EbookResult[];
};
export type VoiceBookReturn = {
resultCount: number;
results: VoiceBookResult[];
};
export type PodcastReturn = {
resultCount: number;
results: PodcastResult[];
};
export type AllReturn = {
resultCount: number;
results: [any: {}];
};
"use strict";
import fetch from "node-fetch";
import { options, entity, attribute, ReturnTypes } from "../@types/type";
import {
options,
entity,
attribute,
MusicReturn,
MusicVideoReturn,
ArtistReturn,
AlbumReturn,
SoftwareReturn,
MovieReturn,
EbookReturn,
VoiceBookReturn,
PodcastReturn,
AllReturn,
} from "../@types/type";

@@ -9,3 +23,3 @@ export async function getSong(

options?: options
): Promise<ReturnTypes | void> {
): Promise<MusicReturn | void> {
try {

@@ -20,8 +34,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: MusicReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -35,3 +48,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<MusicVideoReturn | void> {
try {

@@ -46,8 +59,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: MusicVideoReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -61,3 +73,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<ArtistReturn | void> {
try {

@@ -72,8 +84,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: ArtistReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -87,3 +98,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<AlbumReturn | void> {
try {

@@ -98,8 +109,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: AlbumReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -113,3 +123,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<SoftwareReturn | void> {
try {

@@ -124,8 +134,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: SoftwareReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -139,3 +148,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<MovieReturn | void> {
try {

@@ -150,8 +159,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: MovieReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -165,3 +173,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<EbookReturn | void> {
try {

@@ -176,8 +184,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: EbookReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -191,3 +198,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<VoiceBookReturn | void> {
try {

@@ -202,8 +209,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: VoiceBookReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -217,3 +223,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<PodcastReturn | void> {
try {

@@ -228,8 +234,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: PodcastReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -245,3 +250,3 @@ console.log({ message, name, stack });

options?: options
): Promise<ReturnTypes | void> {
): Promise<AllReturn | void> {
try {

@@ -256,8 +261,7 @@ const res = await fetch(

const json: ReturnTypes = await res.json();
const json: AllReturn = await res.json();
return json;
} catch (e: any) {
const errorTouse: Error = e;
const { message, name, stack } = errorTouse;
const { message, name, stack }: Error = e;

@@ -264,0 +268,0 @@ console.log({ message, name, stack });

@@ -0,0 +0,0 @@ "use strict";

@@ -5,17 +5,17 @@ {

"outDir": "./dist/",
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"target": "es6",
"sourceMap": false,
"target": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"baseUrl": "./dist",
"incremental": true,
"incremental": false,
"strict": true,
"strictNullChecks": false,
"declaration": true,
"typeRoots": ["node_modules/@types", "src/@types"],
"skipLibCheck": true
"inlineSourceMap": false,
"typeRoots": ["node_modules/@types/", "src/@types"],
"resolveJsonModule": true
},
"include": ["src/**/*.ts"],
"include": ["src"],
"exclude": ["node_modules"]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc