Coder Social home page Coder Social logo

angular-spotify's Introduction

angular-spotify

Build Status codecov.io Coverage Status devDependency Status Code Climate Greenkeeper badge Gitter

angular service to connect to the Spotify Web API

angular-spotify makes heavy use of promises throughout the service

Usage

Install angular-spotify via bower. Use the --save property to save into your bower.json file.

bower install angular-spotify --save

Also available on npm

npm install angular-spotify --save

Include spotify into your angular module

var app = angular.module('example', ['spotify']);

Most of the functions in Spotify do not require you to authenticate your application. However if you do need to gain access to playlists or a user's data then configure it like this:

app.config(function (SpotifyProvider) {
  SpotifyProvider.setClientId('<CLIENT_ID>');
  SpotifyProvider.setRedirectUri('<CALLBACK_URI>');
  SpotifyProvider.setScope('<SCOPE>');
  // If you already have an auth token
  SpotifyProvider.setAuthToken('<AUTH_TOKEN>');
});

For example:

app.config(function (SpotifyProvider) {
  SpotifyProvider.setClientId('ABC123DEF456GHI789JKL');
  SpotifyProvider.setRedirectUri('http://www.example.com/callback.html');
  SpotifyProvider.setScope('user-read-private playlist-read-private playlist-modify-private playlist-modify-public');
  // If you already have an auth token
  SpotifyProvider.setAuthToken('zoasliu1248sdfuiknuha7882iu4rnuwehifskmkiuwhjg23');
});

Inject Spotify into a controller to gain access to all the functions available

app.controller('MainCtrl', function (Spotify) {

});

Albums

Get an Album

Get Spotify catalog information for a single album.

Spotify.getAlbum('AlbumID or Spotify Album URI');

Example:

Spotify.getAlbum('0sNOF9WDwhWunNAHPD3Baj').then(function (data) {
  console.log(data);
});

Get Several Albums

Get Spotify catalog information for multiple albums identified by their Spotify IDs.

Spotify.getAlbums('Array or comma separated list of Album IDs');

Example:

Spotify
  .getAlbums('41MnTivkwTO3UUJ8DrqEJJ,6JWc4iAiJ9FjyK0B59ABb4,6UXCm6bOO4gFlDQZV5yL37')
  .then(function (data) {
    console.log(data);
  });

Get an Album’s Tracks

Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.

Spotify.getAlbumTracks('AlbumID or Spotify Album URI', options);
Options Object (Optional)
  • limit - Optional. The maximum number of tracks to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - Optional. The index of the first track to return. Default: 0 (the first object). Use with limit to get the next set of tracks.

Example:

Spotify.getAlbumTracks('6akEvsycLGftJxYudPjmqK').then(function (data) {
  console.log(data);
});

Artists

Get an Artist

Get Spotify catalog information for a single artist identified by their unique Spotify ID or Spotify URI.

Spotify.getArtist('Artist Id or Spotify Artist URI');

Example

Spotify.getArtist('0LcJLqbBmaGUft1e9Mm8HV').then(function (data) {
  console.log(data);
});

Get Several Artists

Get Spotify catalog information for several artists based on their Spotify IDs.

Spotify.getArtists('Comma separated string or array of Artist Ids');

Example:

Spotify
  .getArtists('0oSGxfWSnnOXhD2fKuz2Gy,3dBVyJ7JuOMt4GE9607Qin')
  .then(function (data) {
    console.log(data);
  });

Get an Artist’s Albums

Get Spotify catalog information about an artist’s albums. Optional parameters can be passed in to filter and sort the response.

Spotify.getArtistAlbums('Artist Id or Spotify Artist URI', options);
Options Object (Optional)
  • album_type - Optional A comma-separated list of keywords that will be used to filter the response. If not supplied, all album types will be returned. Valid values are:
    • album
    • single
    • appears_on
    • compilation

Example: { album_type: 'album,single' }

  • country - Optional. An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular country. Note if you do not provide this field, you are likely to get duplicate results per album, one for each country in which the album is available!
  • limit - The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50. For example: { limit: 2 }
  • offset - Optional. The index of the first album to return. Default: 0 (i.e., the first album). Use with limit to get the next set of albums.

Example:

Spotify.getArtistAlbums('1vCWHaC5f2uS3yhpwWbIA6').then(function (data) {
  console.log(data);
});

Get an Artist’s Top Tracks

Get Spotify catalog information about an artist’s top tracks by country.

Spotify.getArtistTopTracks('Artist Id or Spotify Artist URI', 'Country Code');
  • The country: an ISO 3166-1 alpha-2 country code.

Example:

Spotify
  .getArtistTopTracks('1vCWHaC5f2uS3yhpwWbIA6', 'AU')
  .then(function (data) {
    console.log(data);
  });

Get an Artist’s Related Artists

Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community’s listening history.

Spotify.getRelatedArtists('Artist Id or Spotify Artist URI');

Example:

Spotify.getRelatedArtists('1vCWHaC5f2uS3yhpwWbIA6').then(function (data) {
  console.log(data);
});

Browse

Discover new releases and featured playlists. User needs to be logged in to gain access to these features.

Get the featured playlists

Get a list of Spotify featured playlists

Spotify.getFeaturedPlaylists(options);
Options Object (Optional)
  • locale - string - Optional. The desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the results returned in a particular language (where available).
  • country - string - Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.
  • timestamp - string - Optional. A timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ss. Use this parameter to specify the user's local time to get results tailored for that specific date and time in the day. If not provided, the response defaults to the current UTC time. Example: "2014-10-23T09:00:00" for a user whose local time is 9AM.

Example:

Spotify
  .getFeaturedPlaylists({ locale: "nl_NL", country: "NL" })
  .then(function (data) {
    console.log(data);
  });

Get new releases

Get a list of new album releases featured in Spotify

Spotify.getNewReleases(options);
Options Object (Optional)
  • country - string - Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.

Example:

Spotify.getNewReleases({ country: "NL" }).then(function (data) {
  console.log(data);
});

Get categories

Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

Spotify.getCategories(options);
Options Object (Optional)
  • country - string - Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.
  • locale - string - Optional. The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category metadata returned in a particular language.
  • limit - number - Optional. The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - number - Optional. The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of categories.

Example:

Spotify.getCategories({ country: 'SG' }).then(function (data) {
  console.log(data);
});

Get category

Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

Spotify.getCategory(category_id, options);
Required
  • category_id - The Spotify category ID for the category.
Options Object (Optional)
  • country - string - Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.
  • locale - string - Optional. The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category metadata returned in a particular language.

Example:

Spotify.getCategory('party').then(function (data) {
  console.log(data);
})

Get category playlists

Get a list of Spotify playlists tagged with a particular category.

Spotify.getCategoryPlaylists(category_id, options);
Required
  • category_id - The Spotify category ID for the category.
Options Object (Optional)
  • country - string - Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.
  • limit - number - Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - number - Optional. The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.

Example:

Spotify.getCategoryPlaylists('party').then(function (data) {
  console.log(data);
})

Get Recommendations

Create a playlist-style listening experience based on seed artists, tracks and genres.

Spotify.getRecommendations(options);
Options Object
  • limit - number - Optional. The target size of the list of recommended tracks. Default: 20. Minimum: 1. Maximum: 100.
  • market - string - Optional. An ISO 3166-1 alpha-2 country code.
  • max_* - number - Optional. Multiple values. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
  • min_* - number Optional. Multiple values. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
  • seed_artists - A comma separated list of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
  • seed_genres - A comma separated list of any genres in the set of available genre seeds. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
  • seed_tracks - A comma separated list of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
  • target_* - Optional. Multiple values. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Example:

Spotify.getRecommendations({ seed_artists: '4NHQUGzhtTLFvgF5SZesLK' }).then(function (data) {
  console.log(data);
});

Get Available Genre Seeds

Retrieve a list of available genres seed parameter values for recommendations.

Spotify.getAvailableGenreSeeds();

Example:

Spotify.getAvailableGenreSeeds().then(function (data) {
  console.log(data);
});

Follow

These endpoints allow you manage the list of artists and users that a logged in user follows. Following and unfollowing requires the user-follow-modify scope. Check if Current User Follows requires the user-follow-read scope.

Get User’s Followed Artists

Get the current user’s followed artists.

Spotify.following('type', options)
  • type: Required. currently only artist is supported.
Spotify.following('artists', { limit: 10 }).then(function (artists) {
  console.log(artists);
})

Follow Artists or Users

Add the current user as a follower of one or more artists or other Spotify users.

Spotify.follow('type', 'ids');
  • type: Required. either artist or user

Example:

Spotify.follow('user', 'exampleuser01').then(function () {
 // no response from Spotify
});

Unfollow Artists or Users

Remove the current user as a follower of one or more artists or other Spotify users.

Spotify.unfollow('type', 'ids');
  • type: Required. either artist or user

Example:

Spotify.unfollow('user', 'exampleuser01').then(function () {
 // no response from Spotify
});

Check if Current User Follows

Check to see if the current user is following one or more artists or other Spotify users.

Spotify.userFollowingContains('type', 'ids');
  • type: Required. either artist or user
  • ids: Required. comma-separated list.

Example:

Spotify.userFollowingContains('user', 'exampleuser01').then(function (data) {
  console.log(data);
});

Follow a Playlist

Add the current user as a follower of a playlist. Requires playlist-modify-public or playlist-modify-private scope to work.

Spotify.followPlaylist('owner_id', 'playlist_id', isPublic);
  • owner_id: The Spotify user ID of the person who owns the playlist.
  • playlist_id: The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.
  • isPublic: Boolean (Optional), default true. If true the playlist will be included in user's public playlists, if false it will remain private.

Example:

Spotify
 .followPlaylist('jmperezperez', '2v3iNvBX8Ay1Gt2uXtUKUT', false)
 .then(function (data) {
   console.log(data);
 });

Unfollow a Playlist

Remove the current user as a follower of a playlist. Requires playlist-modify-public or playlist-modify-private scope to work.

Spotify.unfollowPlaylist('owner_id', 'playlist_id', isPublic);
  • owner_id: The Spotify user ID of the person who owns the playlist.
  • playlist_id: The Spotify ID of the playlist that is to be no longer followed.

Example:

Spotify
 .unfollowPlaylist('jmperezperez', '2v3iNvBX8Ay1Gt2uXtUKUT')
 .then(function (data) {
   console.log(data);
 });

Check if Users Follow a Playlist

Check to see if one or more Spotify users are following a specified playlist.Following a playlist can be done publicly or privately. Checking if a user publicly follows a playlist doesn't require any scopes; if the user is publicly following the playlist, this endpoint returns true.

Checking if the user is privately following a playlist is only possible for the current user when that user has granted access to the playlist-read-private scope.

Spotify
.playlistFollowingContains('owner_id', 'playlist_id', 'comma separated string or array of user ids');

Example:

Spotify.playlistFollowingContains('jmperezperez', '2v3iNvBX8Ay1Gt2uXtUKUT', 'possan,elogain').then(function (data) {
  console.log(data);
});

Library (may have name changes in next version)

Get Current User’s Saved Tracks

Get a list of the songs saved in the current Spotify user’s “Your Music” library. Requires the user-library-read scope.

Spotify.getSavedUserTracks(options);
Options Object (Optional)
  • limit - Optional. The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - Optional. The index of the first object to return. Default: 0 (i.e., the first object). Use with limit to get the next set of objects.
Spotify.getSavedUserTracks().then(function (data) {
  console.log(data);
});

Check Current User’s Saved Tracks

Check if one or more tracks is already saved in the current Spotify user’s “Your Music” library. Requires the user-library-read scope.

Spotify.userTracksContains('comma separated string or array of spotify track ids');

Example:

Spotify
  .userTracksContains('0udZHhCi7p1YzMlvI4fXoK,3SF5puV5eb6bgRSxBeMOk9')
  .then(function (data) {
   console.log(data);
  });

Save Tracks for Current User

Save one or more tracks to the current user’s “Your Music” library. Requires the user-library-modify scope.

Spotify.saveUserTracks('comma separated string or array of spotify track ids');

Example:

Spotify
  .saveUserTracks('0udZHhCi7p1YzMlvI4fXoK,3SF5puV5eb6bgRSxBeMOk9')
  .then(function (data) {
    console.log(data);
  });

Remove Tracks for Current User

Remove one or more tracks from the current user’s “Your Music” library. Requires the user-library-modify scope.

Spotify.removeUserTracks('comma separated string or array of spotify track ids');

Example:

Spotify
  .removeUserTracks('0udZHhCi7p1YzMlvI4fXoK,3SF5puV5eb6bgRSxBeMOk9')
  .then(function (data) {
    console.log(data);
  });

Save Albums for Current User

Save one or more albums to the current user’s “Your Music” library. Requires the user-library-modify scope.

Spotify.saveUserAlbums('comma separated string or array of spotify album ids');

Example:

Spotify
  .saveUserAlbums('4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M')
  .then(function (data) {
    console.log(data);
  });

Get Current User’s Saved Albums

Get a list of the albums saved in the current Spotify user’s “Your Music” library. Requires the user-library-read scope.

Spotify.getSavedUserAlbums(options);
Options Object (Optional)
  • limit - Optional. The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - Optional. The index of the first object to return. Default: 0 (i.e., the first object). Use with limit to get the next set of objects.
  • market - Optional. An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.
Spotify.getSavedUserAlbums().then(function (data) {
  console.log(data);
});

Remove Albums for Current User

Remove one or more albums from the current user’s “Your Music” library. Requires the user-library-modify scope.

Spotify.removeUserAlbums('comma separated string or array of spotify album ids');

Example:

Spotify
  .removeUserAlbums('4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M')
  .then(function (data) {
    console.log(data);
  });

Check User’s Saved Albums

Check if one or more albums is already saved in the current Spotify user’s “Your Music” library. Requires the user-library-read scope.

Spotify.userAlbumsContains('comma separated string or array of spotify album ids');

Example:

Spotify
  .userAlbumsContains('4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M')
  .then(function (data) {
   console.log(data);
  });

Personalization

Endpoints for retrieving information about the user’s listening habits.

Get a User’s Top Artists

Get the current user’s top artists based on calculated affinity.

Spotify.getUserTopArtists(options);
Options Object (Optional)
  • limit - number - Optional. The number of entities to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - number - Optional. The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.
  • time_range - Optional. Over what time frame the affinities are computed. Valid values: long_term (calculated from several years of data and including all new data as it becomes available), medium_term (approximately last 6 months), short_term (approximately last 4 weeks). Default: medium_term.

Example:

Spotify.getUserTopArtists({ limit: 50 }).then(function (data) {
  console.log(data);
});

Get a User’s Top Tracks

Get the current user’s top tracks based on calculated affinity.

Spotify.getUserTopTracks(options);
Options Object (Optional)
  • limit - number - Optional. The number of entities to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - number - Optional. The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.
  • time_range - Optional. Over what time frame the affinities are computed. Valid values: long_term (calculated from several years of data and including all new data as it becomes available), medium_term (approximately last 6 months), short_term (approximately last 4 weeks). Default: medium_term.

Example:

Spotify.getUserTopTracks({ limit: 50 }).then(function (data) {
  console.log(data);
});

Playlists

User needs to be logged in to gain access to playlists

Get a List of a User’s Playlists

Get a list of the playlists owned by a Spotify user. Requires the playlist-read-private scope

Spotify.getUserPlaylists('user_id', options);
Options Object (Optional)
  • limit - Optional. The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - Optional. The index of the first playlist to return. Default: 0 (the first object). Use with limit to get the next set of playlists.

Example:

Spotify.getUserPlaylists('wizzler').then(function (data) {
  console.log(data);
});

Get a Playlist

Get a playlist owned by a Spotify user.

Spotify.getPlaylist('user_id', 'playlist_id', options);
Options Object (Optional)
  • fields - Optional. Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned. Sub-fields can be excluded by prefixing them with an exclamation mark. More Info
Spotify
  .getPlaylist('1176458919', '6Df19VKaShrdWrAnHinwVO')
  .then(function (data) {
    console.log(data);
  });

Get a Playlist’s Tracks

Get full details of the tracks of a playlist owned by a Spotify user. Requires the playlist-read-private scope.

Spotify.getPlaylistTracks('user_id', 'playlist_id', options);

Example:

Spotify
  .getPlaylistTracks('1176458919', '6Df19VKaShrdWrAnHinwVO')
  .then(function (data) {
   console.log(data);
  });

Create a Playlist

Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.) Creating a public playlist requires the playlist-modify-public scope. Creating a private playlist requires the playlist-modify-private scope.

Spotify.createPlaylist('user_id', options);
Options Object
  • name - string - Required. The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique; a user may have several playlists with the same name.
  • public - boolean - Optional, default true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope.

Example:

Spotify
  .createPlaylist('1176458919', { name: 'Awesome Mix Vol. 1' })
  .then(function (data) {
   console.log('playlist created');
  });

Add Tracks to a Playlist

Add one or more tracks to a user’s playlist. Adding tracks to a public playlist requires the playlist-modify-public scope. Adding tracks to a private playlist requires the playlist-modify-private scope.

Spotify.addPlaylistTracks('user_id', 'playlist_id', 'comma separated string or array of spotify track uris');
Options Object (Optional)
  • position - integer - Optional. The position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: position=0; to insert the tracks in the third position: position=2. If omitted, the tracks will be appended to the playlist. Tracks are added in the order they are listed in the query string or request body.

Example:

Spotify
  .addPlaylistTracks('1176458919', '2TkWjGCu8jurholsfdWtG4', 'spotify:track:4iV5W9uYEdYUVa79Axb7Rh, spotify:track:1301WleyT98MSxVHPZCA6M')
  .then(function (data) {
    console.log('tracks added to playlist');
  });

Remove Tracks from a Playlist

Remove one or more tracks from a user’s playlist. Removing tracks from a public playlist requires the playlist-modify-public scope. Removing tracks from a private playlist requires the playlist-modify-private scope.

Spotify.removePlaylistTracks('user_id', 'playlist_id', 'comma separated string or array of spotify track ids or uris');

Example:

Spotify
  .removePlaylistTracks('1176458919', '2TkWjGCu8jurholsfdWtG4', 'spotify:track:4iV5W9uYEdYUVa79Axb7Rh, spotify:track:1301WleyT98MSxVHPZCA6M')
  .then(function (data) {
    console.log('tracks removed from playlist');
  });

Reorder a Playlist's Tracks

Reorder a track or a group of tracks in a playlist.

Spotify.reorderPlaylistTracks('user_id', 'playlist_id', options);
Options Object (Required)
  • range_start - integer - Required. The position of the first track to be reordered.
  • range_length - integer - Optional. The amount of tracks to be reordered. Defaults to 1 if not set.
  • insert_before - integer - Required. The position where the tracks should be inserted.
  • snapshot_id - string - Optional. The playlist's snapshot ID against which you want to make the changes.

Example:

Spotify.reorderPlaylistTracks('1176458919', '2TkWjGCu8jurholsfdWtG4', {
  range_start: 8,
  range_length: 5,
  insert_before: 0
}).then(function (data) {
  console.log(data);
});

Replace a Playlist’s Tracks

Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist. Replacing tracks in a public playlist requires the playlist-modify-public scope. Replacing tracks in a private playlist requires the playlist-modify-private scope.

Spotify.replacePlaylistTracks('user_id', 'playlist_id', 'comma separated string or array of spotify track ids or uris');

Example:

Spotify
  .replacePlaylistTracks('1176458919', '2TkWjGCu8jurholsfdWtG4', 'spotify:track:4iV5W9uYEdYUVa79Axb7Rh, spotify:track:1301WleyT98MSxVHPZCA6M')
  .then(function (data) {
    console.log('tracks removed from playlist');
  });

Change a Playlist’s Details

Change a playlist’s name and public/private state. (The user must, of course, own the playlist.) Changing a public playlist requires the playlist-modify-public scope. Changing a private playlist requires the playlist-modify-private scope.

Spotify.updatePlaylistDetails('user_id', 'playlist_id', options);
Options Object (Optional)
  • name - string - Optional. The new name for the playlist, for example "My New Playlist Title".
  • public - Boolean - Optional. If true the playlist will be public, if false it will be private.

Example:

Spotify
  .updatePlaylistDetails('1176458919', '2TkWjGCu8jurholsfdWtG4', { name: 'Updated Playlist Title' })
  .then(function (data) {
    console.log('Updated playlist details');
  });

User Profiles

User needs to be logged in to gain access to user profiles

Get a User’s Profile

Get public profile information about a Spotify user.

Spotify.getUser('user_id');

Example:

Spotify.getUser('wizzler').then(function (data) {
  console.log(data);
});

Get Current User’s Profile

Get detailed profile information about the current user (including the current user’s username).

Spotify.getCurrentUser();

Example:

Spotify.getCurrentUser().then(function (data) {
  console.log(data);
});

Search

Search for an Item

Get Spotify catalog information about artists, albums, or tracks that match a keyword string.

Spotify.search('Search Query', 'type', options);
  • type - Required. A comma-separated list of item types to search across. Valid types are: album, artist, playlist, and track.
Options Object (Optional)
  • limit - Optional. The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
  • offset - Optional. The index of the first object to return. Default: 0 (i.e., the first object). Use with limit to get the next set of objects.

Example:

Spotify.search('Nirvana', 'artist').then(function (data) {
  console.log(data);
});

Tracks

Get a Track

Get Spotify catalog information for a single track identified by its unique Spotify ID or Spotify URI.

Spotify.getTrack('Track Id or Spotify Track URI');

Example:

Spotify.getTrack('0eGsygTp906u18L0Oimnem').then(function (data) {
  console.log(data);
});

Get Several Tracks

Get Spotify catalog information for multiple tracks based on their Spotify IDs.

Spotify.getTracks('Comma separated list or array of Track Ids');

Example:

Spotify.getTracks('0eGsygTp906u18L0Oimnem,1lDWb6b6ieDQ2xT7ewTC3G').then(function (data) {
  console.log(data);
});

Get Audio Features for a Track

Get audio feature information for a single track identified by its unique Spotify ID.

Spotify.getTrackAudioFeatures('Track Id or Spotify Track URI');

Example:

Spotify.getTrackAudioFeatures('0eGsygTp906u18L0Oimnem').then(function (data) {
  console.log(data);
});

Get Audio Features for Several Tracks

Get audio features for multiple tracks based on their Spotify IDs.

Spotify.getTracksAudioFeatures('Comma separated list or array of Track Ids');

Example:

Spotify.getTracksAudioFeatures('0eGsygTp906u18L0Oimnem,1lDWb6b6ieDQ2xT7ewTC3G').then(function (data) {
  console.log(data);
});

Authentication

Login

Will open login window. Requires user to initiate as it will open a pop up window. Requires client id, callback uri and scope to be set in config.

Spotify.login();

Example:

$scope.login = function () {
  Spotify.login();
};

Example callback html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title></title>
  <script>
    window.onload = function () {
      var hash = window.location.hash;
      if (window.location.search.substring(1).indexOf("error") !== -1) {
        // login failure
        window.close();
      } else if (hash) {
        // login success
        var token = window.location.hash.split('&')[0].split('=')[1];
        localStorage.setItem('spotify-token', token);
      }
    }
  </script>
</head>
<body>

</body>
</html>

Bitdeli Badge

angular-spotify's People

Contributors

bitdeli-chef avatar connor11528 avatar dependabot-preview[bot] avatar dependabot[bot] avatar dirkgroenen avatar eddiemoore avatar gitter-badger avatar greenkeeper[bot] avatar karensg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-spotify's Issues

401 errors when making calls to Spotify Web API

Hi Eddie,

I keep getting 401 errors when making calls to getUserPlaylists and createPlaylist.

I have the following scopes authorized: 'playlist-modify-public, playlist-read-private, playlist-modify-private', so I should be able to read and write playlists, but these permissions errors keep coming up.

Missing Token for Audio Feature Methods

Hi there, thanks for this dope library!
Everything works fine except getting the audio features of a track (tempo, danceability etc..). The problem is, that the methods getTrackAudioFeatures and getTracksAudioFeatures do not send an access token, which is required, see spotify api docs for audio-features.

A simple fix could be:

Line 474, change

return this.api('/audio-features/' + track);

to

return this.api('/audio-features/' + track, 'GET', null, null, this._auth());

this will send the token in the header!

Similar need to append this._auth() to getTracksAudioFeatures.

I could send a PR if you want!

Have a nice day,
Felix

Can't get latest version from Bower?

For some reason, calling "bower install angular-spotify --save" on Mac OSX will only retrieve 1.3.0. Same issue if I do "bower install angular-spotify#1.4.0 --save" directly

Dump:

bower not-cached https://github.com/eddiemoore/angular-spotify.git#1.4.0
bower resolve https://github.com/eddiemoore/angular-spotify.git#1.4.0
bower ENORESTARGET No tag found that was able to satisfy 1.4.0

Additional error details:
Available versions in https://github.com/eddiemoore/angular-spotify.git: 1.3.0, 1.2.1, 1.2.0, 1.1.1, 1.0.0, 0.14.0, 0.13.0, 0.12.0, 0.11.0, 0.10.0, 0.9.3, 0.8.1, 0.8.0, 0.7.0, 0.6.0, 0.5.4, 0.5.0, 0.3.0, 0.1.15, 0.1.14, 0.1.13, 0.1.12, 0.1.11, 0.1.10

An in-range update of jasmine-node is breaking the build 🚨

Version 1.14.6 of jasmine-node was just published.

Branch Build failing 🚨
Dependency [jasmine-node](https://github.com/mhevery/jasmine-node)
Current Version 1.14.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

jasmine-node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of grunt-contrib-uglify is breaking the build 🚨

Version 3.4.0 of grunt-contrib-uglify was just published.

Branch Build failing 🚨
Dependency grunt-contrib-uglify
Current Version 3.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

grunt-contrib-uglify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

SpotifyProvider.setAuthToken later in life cycle

After I login I get back a token and have it saved in localStorage:

app.controller('MainCtrl', function($scope, $http, $window, $rootScope, Spotify, SpotifyProvider){
    $rootScope.token = $window.localStorage.getItem('spotify-token') || false;

    $scope.requestSpotifyLogin = function(){
        Spotify.login().then(function(data){
            $rootScope.token = data;
        });
    };
});

Then when I send a request like (Spotify.userFollowingContains('type', 'ids')) I get an error that my request is not authorized even though I am logged in:

GET https://api.spotify.com/v1/me/following/contains?ids=ids&type=type 401 (Unauthorized)

I think that is because I have not set my auth token with SpotifyProvider.setAuthToken('zoasliu1248sdfuiknuha7882iu4rnuwehifskmkiuwhjg23');. However when the Provider phase runs I do not have a token.

What I would like to do is Spotify.setAuthToken($rootScope.token) and maybe Spotify.getAuthToken() so that once a user logs in I can begin authorizing requests

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

get the current user ID

It would be really useful if the module could get the current user id as that is used in a number of places to retrieve further info.

An in-range update of jshint is breaking the build 🚨

Version 2.9.6 of jshint was just published.

Branch Build failing 🚨
Dependency jshint
Current Version 2.9.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

jshint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes JSHint 2.9.6

2.9.6 (2018-07-30)

Bug Fixes

  • Add missing global objects for browser env (badc7a4)
  • Add other Fetch spec globals (07bb596), closes #2582
  • Allow closing over immutable bindings (7091685)
  • Allow computed method names in obj literal (a5ff715)
  • Allow empty export and trailing comma (631327e), closes #2567
  • Avoid infinite loop on invalid for stmt (56a4379)
  • Consistently ignore dot-prefixed dirs (8d4317e)
  • Correct impl of built-in bindings (a11d631)
  • Correct interpretation of whitespace (dd06eea)
  • Correct location of reported error (1c434a3)
  • Correct location reported for W043 (1d04868)
  • Correct reporting of var name in list comprehensions (0ff6644)
  • Correct restriction on function name (55aa54e)
  • Correct spelling of Uint8ClampedArray (8df4a32)
  • Create block scope for switch statements (aa2be10)
  • Disallow default values in rest parameters (b420aed)
  • Do not create binding for illegal syntax (9fe8c94)
  • Do not warn about non-ambiguous linebreaks (ab3ab85)
  • Fix "is is" message typos (7993101)
  • Preserve functionality in "legacy" Node.js (2f6ac13)
  • recognize Jasmine global spyOnProperty (827237f), closes #3183
  • Relax restriction on asgnmnt to arguments (0a66710)
  • Remove warning W100 (ff71d3c)
  • Report error for duplicate arrow params (506c7d5)
  • Report error for redeclared generator fns (8896fa3)
  • Restrict "name" of strict mode functions (a554c89)
  • Restrict super usage to valid forms (8f3f880)
  • Restrict IdentifierNames in ES5 code (5995a9f)
  • Tolerate division following closing brace (3aa02db)
  • Tolerate RegExp as void operand (3f920b5)
  • Tolerate whitespace in inline directives (efeb0f8)

Features

  • List outer scoped variables of W083 (d03662c), closes #3211
Commits

The new version differs by 113 commits.

  • d5c1a00 v2.9.6
  • ab3ab85 [[FIX]] Do not warn about non-ambiguous linebreaks
  • eaca85b [[CHORE]] Improve test coverage for ASI warning
  • 0a66710 [[FIX]] Relax restriction on asgnmnt to arguments
  • 3aa02db [[FIX]] Tolerate division following closing brace
  • 55aa54e [[FIX]] Correct restriction on function name
  • ff71d3c [[FIX]] Remove warning W100
  • bcb3b23 [[CHORE]] Complete Lodash update (#3283)
  • 030713d [[DOCS]] Introduce administration e-mail address
  • 7993101 [[FIX]] Fix "is is" message typos
  • 578575d Merge pull request #3254 from mathiasbynens/unicode-10
  • d763e70 Use old Unicode version for ES5 identifiers
  • 77414e8 Update to Unicode v11
  • 5995a9f [[FIX]] Restrict IdentifierNames in ES5 code
  • f2ce8fe [[TEST]] Add regression test

There are 113 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Redirect URI Mobile App

Hi,

thank you a lot for your great work with this plugin! I'm currently working on an Hybrid App (ionic Framework) and in don't get the Login to work.

What has the callback uri to be for a mobile application? i tried to make an html on an external server and everything works fine besides the localSotorage value isn't set in the right window. It is set in the Popup Window of my callback URI but not in the App window.

I need some help here :-(

How to store the token after login?

Hi, thank's for this awesome project!
I'm a newbie. So my question will be stupid.
Can you help me to understand the perfect login flow to store the token after the login?
I'm trying to do it in Angular.
So in the main controller, after the user click on the button Login, i can access Spotify to retrive the token and with your example (callback.html) i'm able to store in the localStorage.
But after that i can't figure how to use it to make the Authorized api call.
Please help me 😰

rederict callback window not closing on heroku deploy

When I log in with spotify everything works peachy on localhost. However for my heroku deploy I will log in to spotify and the callback.html will appear with an access token in the url string, but the box does not close itself. LocalStorage is updated on the callback.html but not for the main site, index.html

screen shot 2015-11-20 at 11 24 31 am

The issue is that in production the callback.html box does not go away by itself after contacting spotify successfully. It works when running on localhost though..

authorization example

Eddie - thank you so much for this angular service. As a newb to web development this has been huge in motivating me to learn more. I've hit a bit of a snag on the authorization example - I'm not certain if my mistake or not.
Login opens the dialog window, I login to spotify with my credentials.
When the example's callback.html is triggered I see that the spotify-token is correctly parsed and set on the localStorage.
But I never see the added event listener trigger the storageChanged() method.
Therefore the dialog window hangs open, and auth is never considered complete.
I've tried firefox and chrome and see the same issue.
Any idea what might be going on?
Any help is much appreciated.
Thanks
-Scott

Can't login. New windown doesn't close.

Hello everybody.

I'm using angular v1.6.4 and angular-spotify for angular 1.6.

I'm just trying to login. Until now, my app just should do that. So I don't have much code. I'm using all code provided as example in this repository, just for learning.

My callback.html looks like just as in the bottom of the README page.

My problem is: I can't login or I can't get the token. When I press the login button, the login window is created. I insert my credentials. But after, in the same login window, I am redirected to my app home. So I remain with two windows in my app home. When I force to close the window that was created when I pressed the login button, I verify that the login wasn't successful.

My code.

Can somebody help me? I don't know if it is a bug or if I am missing something.

XMLHttpRequest cannot load https://api.spotify.com/v1/search?q=h&type=artist. Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers.

The example project work perfectly for me. However when I transfer the code to my own project I get this error. XMLHttpRequest cannot load https://api.spotify.com/v1/search?q=h&type=artist. Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers.

Thank you very much.

app.js


angular.module('plunker', ['ui.bootstrap', 'ngFacebook', 'spotify'])

.config( function( $facebookProvider, SpotifyProvider ) {
  $facebookProvider.setAppId('481111111190694');
  $facebookProvider.setPermissions("email");
  SpotifyProvider.setClientId('123456789123456789');
  SpotifyProvider.setRedirectUri('http://example.com/callback.html');
  SpotifyProvider.setScope('playlist-read-private');
})

.run( function( $rootScope ) {
  // Load the facebook SDK asynchronously
  (function(){
     // If we've already installed the SDK, we're done
     if (document.getElementById('facebook-jssdk')) {return;}

     // Get the first script element, which we'll use to find the parent node
     var firstScriptElement = document.getElementsByTagName('script')[0];

     // Create a new script element and set its id
     var facebookJS = document.createElement('script'); 
     facebookJS.id = 'facebook-jssdk';

     // Set the new script's source to the source of the Facebook JS SDK
     facebookJS.src = '//connect.facebook.net/en_US/all.js';

     // Insert the Facebook JS SDK into the DOM
     firstScriptElement.parentNode.insertBefore(facebookJS, firstScriptElement);
   }());
})

;

var DemoCtrl = function ($scope, $facebook, Spotify) {
  $scope.isLoggedIn = false;
  $scope.login = function() {
    $facebook.login().then(function() {
      refresh();
    });
  }
  function refresh() {
    $facebook.api("/me").then( 
      function(response) {
        $scope.welcomeMsg = "Welcome " + response.name + " please choose a song";
        $scope.name = response.name
        $scope.response = response;
        $scope.isLoggedIn = true;
      },
      function(err) {
        $scope.welcomeMsg = "Please log in";
      });
  }
  refresh();

    $scope.searchArtist = function () {
      Spotify.search($scope.searchartist, 'artist').then(function (data) {
        $scope.artists = data.artists.items;
      });
    };


};

index.html

<!doctype html>
<html ng-app="plunker">
    <head>
        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.js">
        </script>
        <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.7.0.js">
        </script>
        <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
        <script src="//rawgithub.com/GoDisco/ngFacebook/master/ngFacebook.js"></script>
        <script src="app.js"></script>
        <script src="bower_components/strophe/strophe.min.js"></script>
        <script src="bower_components/angular-spotify/src/angular-spotify.js"></script>

    </head>
    <body ng-controller="DemoCtrl">

        <div class="container">
            <h4 ng-hide="!isLoggedIn">
                Hello {{name}}
                Please choose a song
            </h4>
            <button type="button" ng-click="login()" ng-hide="isLoggedIn" class="btn">
                Login
            </button>
        <div id="spotify-search" ng-hide="!isLoggedIn">
            <input type="text" ng-model="searchartist" ng-change="searchArtist()" placeholder="Search for an artist">
            <ul>
                <li ng-repeat="artist in artists">
                    <a class="media" ng-href="{{artist.external_urls.spotify}}" target="_blank">
                        <img ng-src="{{artist.images[0].url}}" alt="">
                        <div class="media-details">
                            {{artist.name}}
                        </div>
                    </a>
                </li>
            </ul>
        </div>
        </div>

        <div id="fb-root">
        </div>


    </body>

</html>

An in-range update of coveralls is breaking the build 🚨

The devDependency coveralls was updated from 3.0.2 to 3.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for Dependency security updates

As suggested by NPM and Snyk.

Commits

The new version differs by 1 commits.

  • aa2519c dependency security audit fixes from npm & snyk (#210)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

No token provided in spotify queries

I'm following all needed steps in order to get angular-spotify working (setting clientId, token, etc)

But when performing the call to spotify api, I get a 401 error response saying token is not provided. I looked at the call headers, and I see it is not sending the token for authentication:

access-control-allow-credentials true access-control-allow-headers Accept, Authorization, Origin, Content-Type, Retry-After access-control-allow-methods GET, POST, OPTIONS, PUT, DELETE, PATCH access-control-allow-origin * access-control-max-age 604800 alt-svc clear content-encoding gzip content-length 90 content-type application/json date Sat, 04 Aug 2018 23:26:01 GMT via 1.1 google www-authenticate Bearer realm="spotify" X-Firefox-Spdy

If i add manually the 'Authorization' parameter with my token to the query, it performs the call correctly, and gives me the data I want.

Any idea why is not attaching the token to the call params? Thank you!

P.S.: I'm using tag 1.4.2 in order to make it work with angular 1.5

Internet Explorer login can't send token to main window

There is a problem with postMessage in IE when the login window that was opened redirects back to the callback.html page. When it hits this page calling postMessage on the window.opener doesn't work. window.opener is null.

An in-range update of grunt is breaking the build 🚨

Version 1.0.3 of grunt was just published.

Branch Build failing 🚨
Dependency grunt
Current Version 1.0.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

grunt is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 9ba3a99 1.0.3
  • eee4c33 Changelog v1.0.3
  • 46da7f2 Merge pull request #1636 from gruntjs/upt
  • 00f4d8a Drop support for Node 0.10 and 0.12
  • e852727 util update
  • 56d702e Update deps
  • 0105524 Fix race condition with file.mkdir and make it operate more similarily to mkdir -p (#1627) r=@vladikoff
  • 303d445 https links (#1629)
  • d969132 Merge pull request #1624 from gruntjs/rm-bump-deps
  • 289ff91 Remove old bump task and deps

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

how to setRedirectUri based on environment?

I am using SpotifyProvider.setRedirectUri in my app.config block like so:

SpotifyProvider.setRedirectUri('http://localhost:3000/api/spotify/callback');

Now I have deployed my application to heroku at http://showjunkie.herokuapp.com/#/. How can I conditionally set the rederict uri based on the environment? I don't want the production env to point to localhost but it is nice for development

bower version is out of date

Hey eddiemoore,

Thanks for putting this together, it's been rather useful.

I just encountered an issue however when I try to use the getCategories function.

It seems that the version of angular-spotify available over bower hasn't had its /dist/ file updated to the latest changes. I can see the getCategories function in the /src/js file, but not the /dist/js file.

Cheers,

Simon

An in-range update of phantomjs-prebuilt is breaking the build 🚨

Version 2.1.16 of phantomjs-prebuilt was just published.

Branch Build failing 🚨
Dependency phantomjs-prebuilt
Current Version 2.1.15
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

phantomjs-prebuilt is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 2 commits.

  • 0cc1407 Merge pull request #746 from avindra/patch-1
  • 2c46265 Dependencies: change tilde to caret

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

auth_token not set

Hi, Im following your example but my auth token is not set so all future request return 401,
What can i do?

success is not a function

TypeError: $http(...).success is not a function
at NgSpotify.api (vendor.js:41735)
at NgSpotify.getAlbum (vendor.js:41765)
at root.controller.js:19
at Scope.$emit (vendor.js:18425)
at SearchInputController.ctrl.onclick (searchinput.controller.js:8)
at fn (eval at compile (vendor.js:15351), :4:177)
at callback (vendor.js:26969)
at Scope.$eval (vendor.js:18172)
at Scope.$apply (vendor.js:18272)
at HTMLDivElement. (vendor.js:26974)

An in-range update of codecov is breaking the build 🚨

Version 3.0.3 of codecov was just published.

Branch Build failing 🚨
Dependency codecov
Current Version 3.0.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

codecov is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v3.0.3

Fix for not git repos

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

INVALID_CLIENT: Invalid redirect URI

hi am getting this error when trying to authenticate with spotify services, these are my configurations:

.config(function (SpotifyProvider) {
    SpotifyProvider.setClientId('<CLIENT_ID>');
    SpotifyProvider.setRedirectUri('http://localhost/ideas/spotify/callback');
     SpotifyProvider.setScope('playlist-read-private');
 })

in my controller i have the login function that runs when users click a login button

$scope.login = function () {
    Spotify.login();
};

in my index page am loading this to js files: angular.min.js and angular-spotify.js in that order. can you help me figure out what am missing or what am doing wrong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.