Module: models

models

Properties:
Name Type Description
library Library See Library
player Player See Player
application Application See Application
Source:
  • ../client-desktop/apps/built-in/import/scripts/api/models.js, line 1

Example

var sp = getSpotifyApi();
var models = sp.require('$api/models');

var myAwesomePlaylist = new models.Playlist("My Awesome Playlist");
myAwesomePlaylist.add(models.player.track);
myAwesomePlaylist.add("spotify:track:6JEK0CvvjDjjMUBFoXShNZ");

Classes

Album
Application
Artist
Collection
Library
Link
Observable
Player
Playlist
Search
Session
Toplist
Track

Methods

<inner> readFile

Get the contents of the specified file.

Parameters:
Name Type Description
filename string Filename relative to the app root
Source:
  • ../client-desktop/apps/built-in/import/scripts/api/models.js, line 1997
Returns:
The contents of the file
Type
string

TypeDefs

Tracks

Source:
  • ../client-desktop/apps/built-in/import/scripts/api/models.js, line 50