Socket
Socket
Sign inDemoInstall

itunes

Package Overview
Dependencies
14
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

.track.js.swp

19

iresults.js

@@ -10,2 +10,3 @@ /*

var Album = require('album').Album;
var Track = require('track').Track;

@@ -86,1 +87,19 @@ //Track total and completed instances of the class for debugging purposes.

};
/*
Extracts a few items from the iTunes results for an album search and returns them in an object.
*/
iResults.prototype.getTrack = function() {
var track = '';
if (this.data.wrapperType == 'track' && this.data.kind == 'song') {
var track = new Track(this.data.trackName,
this.data.trackId,
this.data.trackViewUrl,
this.data.artistId,
this.data.artworkUrl60,
this.data.artworkUrl100,
this.data.artistName);
} else {
}
return track;
};

@@ -101,2 +101,5 @@ /*

if (results.hits > 1) {
error = 1;
} else if ( results.hits == 0) {
error = 1;
} else {

@@ -106,2 +109,13 @@ data = results.getAlbum();

break;
case 'track':
if (results.hits > 1) {
//console.log('iTunes.responseEnd : ' + dataType + ' : too many results');
error = 1;
} else if ( results.hits == 0) {
error = 1;
} else {
//console.log('iTunes.responseEnd : ' + dataType + ' 1 hit!');
data = results.getTrack();
};
break;
case 'raw':

@@ -133,1 +147,12 @@ data = results.data; // returns JSON for full results

};
iTunes.prototype.lookupTrack = function(params, callback) {
var self = this;
var artist = params.artist;
var track = params.track;
self.params.media='music';
self.params.entity='musicTrack';
self.params.attribute='musicTrackTerm';
self.params.term = track;
self.request('track',callback);
}

2

package.json

@@ -5,3 +5,3 @@ {

"keywords":["itunes","music"],
"version":"0.0.1",
"version":"0.0.2",
"author":"Garrett Wilkin <garrett.wilkin@gmail.com>",

@@ -8,0 +8,0 @@ "repository":

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc