0.0.3 • Published 11 years ago

itunesapi v0.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
11 years ago

itunesapi

Installion

$ npm install itunesapi

Creating an api instance

  var itunes = require('itunesapi');

Searching

Searching Itunes is really simple.

You provide a term to search for and the api does the rest. However they have a lot of small parameters you can pass to narrow the search

Basic Search

  var options = {
    query: 'The Amazing Spiderman 2'
  }

  itunes.search(options, function (results){
    console.log(results);
  });

#Options

var options = {
  country: "US"        // {string} (http://en.wikipedia.org/wiki/%20ISO_3166-1_alpha-2)
  , limit: 20          // {int}
  , lang: 'en_us'      // {string}
  , explicit: true     // {booleon}
  , media : "software" // {string} (movie, podcast, music, musicVideo, audiobook, shortFilm, tvShow, software, ebook, all)
  , entity: "all"      // {string}
    /* for entities they depend on the media

      movie :	    movieArtist, movie
      podcast:	  podcastAuthor, podcast
      music:	    musicArtist, musicTrack, album, musicVideo, mix, song
      musicVideo:	musicArtist, musicVideo
      audiobook:	audiobookAuthor, audiobook
      shortFilm:	shortFilmArtist, shortFilm
      tvShow:	    tvEpisode, tvSeason
      software:	  software, iPadSoftware, macSoftware
      ebook:	    ebook
      all:	      movie, album, allArtist, podcast, musicVideo, mix, audiobook, tvSeason, allTrack

      default: media type
    */
  , attribute: "all"  //{string}

  /* for attributes depends on the media
    movie: 	      actorTerm, genreIndex, artistTerm, shortFilmTerm, producerTerm,
                  ratingTerm, directorTerm, releaseYearTerm, featureFilmTerm,
                  movieArtistTerm, movieTerm, ratingIndex, descriptionTerm

    podcast:	    titleTerm, languageTerm, authorTerm, genreIndex, artistTerm,
                  ratingIndex, keywordsTerm, descriptionTerm

    music:	      mixTerm, genreIndex, artistTerm, composerTerm, albumTerm,
                  ratingIndex, songTerm

    musicVideo: 	genreIndex, artistTerm, albumTerm, ratingIndex, songTerm

    audiobook:	  titleTerm, authorTerm, genreIndex, ratingIndex

    shortFilm:	  genreIndex, artistTerm, shortFilmTerm, ratingIndex, descriptionTerm

    software:	    softwareDeveloper

    tvShow:	      genreIndex, tvEpisodeTerm, showTerm, tvSeasonTerm, ratingIndex,
                  descriptionTerm

    all:	        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

    default: media type

  */
}
0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago