spotify-service-rg
Advanced tools
Comparing version 1.0.2 to 1.0.3
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http')) : | ||
typeof define === 'function' && define.amd ? define('spotify-service-rg', ['exports', '@angular/core', '@angular/common/http'], factory) : | ||
(factory((global['spotify-service-rg'] = {}),global.ng.core,global.ng.common.http)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http')) : | ||
typeof define === 'function' && define.amd ? define('spotify-service-rg', ['exports', '@angular/core', '@angular/common/http'], factory) : | ||
(factory((global['spotify-service-rg'] = {}),global.ng.core,global.ng.common.http)); | ||
}(this, (function (exports,i0,i1) { 'use strict'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var SpotifyRgService = /** @class */ (function () { | ||
function SpotifyRgService(http) { | ||
this.http = http; | ||
this.baseUrl = "https://api.spotify.com/v1"; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.login = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
window.location.href = 'https://accounts.spotify.com/authorize' + | ||
'?response_type=token' + | ||
'&client_id=' + this.clientId + | ||
(this.scopes ? '&scope=' + encodeURIComponent(this.scopes) : '') + | ||
'&redirect_uri=' + encodeURIComponent(this.callBackUrl); | ||
}; | ||
//Setters for the configuration properties | ||
//Setters for the configuration properties | ||
/** | ||
* @param {?} clientId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.setClientId = | ||
//Setters for the configuration properties | ||
/** | ||
* @param {?} clientId | ||
* @return {?} | ||
*/ | ||
function (clientId) { | ||
this.clientId = clientId; | ||
}; | ||
/** | ||
* @param {?} callBackUrl | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.setCallBackUrl = /** | ||
* @param {?} callBackUrl | ||
* @return {?} | ||
*/ | ||
function (callBackUrl) { | ||
this.callBackUrl = callBackUrl; | ||
}; | ||
/** | ||
* @param {?} scopes | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.setScopes = /** | ||
* @param {?} scopes | ||
* @return {?} | ||
*/ | ||
function (scopes) { | ||
this.scopes = scopes; | ||
}; | ||
/** | ||
* @param {?} token | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.setToken = /** | ||
* @param {?} token | ||
* @return {?} | ||
*/ | ||
function (token) { | ||
this.token = token; | ||
}; | ||
/** @description Returns album | ||
* @param artistId Albums Spotify ID. | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var SpotifyRgService = /** @class */ (function () { | ||
function SpotifyRgService(http) { | ||
this.http = http; | ||
this.baseUrl = "https://api.spotify.com/v1"; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns album | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getAlbum = /** | ||
* \@description Returns album | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
function (albumId) { | ||
return this.apiGet("/albums/" + albumId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns albums | ||
* @param artistId Comma separated list of album ID's in a string.. | ||
SpotifyRgService.prototype.login = /** | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns albums | ||
* @param {?} albumIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getAlbums = /** | ||
* \@description Returns albums | ||
* @param {?} albumIds | ||
* @return {?} | ||
*/ | ||
function (albumIds) { | ||
return this.apiGet("/albums/?ids=" + albumIds, null, this.getHeaders()); | ||
}; | ||
/** @description Returns albums tracks | ||
* @param artistId Albums Spotify ID. | ||
function () { | ||
window.location.href = 'https://accounts.spotify.com/authorize' + | ||
'?response_type=token' + | ||
'&client_id=' + this.clientId + | ||
(this.scopes ? '&scope=' + encodeURIComponent(this.scopes) : '') + | ||
'&redirect_uri=' + encodeURIComponent(this.callBackUrl); | ||
}; | ||
//Setters for the configuration properties | ||
//Setters for the configuration properties | ||
/** | ||
* @param {?} clientId | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns albums tracks | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getAlbumsTracks = /** | ||
* \@description Returns albums tracks | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
function (albumId) { | ||
return this.apiGet("/albums/" + albumId + "/tracks", null, this.getHeaders()); | ||
}; | ||
/** @description Returns artist | ||
* @param artistId Artists spotify ID. | ||
SpotifyRgService.prototype.setClientId = | ||
//Setters for the configuration properties | ||
/** | ||
* @param {?} clientId | ||
* @return {?} | ||
*/ | ||
function (clientId) { | ||
this.clientId = clientId; | ||
}; | ||
/** | ||
* @param {?} callBackUrl | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns artist | ||
* @param {?} artistId Artists spotify ID. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtist = /** | ||
* \@description Returns artist | ||
* @param {?} artistId Artists spotify ID. | ||
* @return {?} | ||
*/ | ||
function (artistId) { | ||
return this.apiGet("/artists/" + artistId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns artists | ||
* @param artistId Comma separated list of artist ID's in a string. | ||
SpotifyRgService.prototype.setCallBackUrl = /** | ||
* @param {?} callBackUrl | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns artists | ||
* @param {?} artistIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtists = /** | ||
* \@description Returns artists | ||
* @param {?} artistIds | ||
* @return {?} | ||
*/ | ||
function (artistIds) { | ||
return this.apiGet("/artists/?ids=" + artistIds, null, this.getHeaders()); | ||
}; | ||
/** @description Returns artists albums | ||
* @param artistId Artists Spotify ID. | ||
function (callBackUrl) { | ||
this.callBackUrl = callBackUrl; | ||
}; | ||
/** | ||
* @param {?} scopes | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns artists albums | ||
* @param {?} artistId Artists Spotify ID. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtistsAlbums = /** | ||
* \@description Returns artists albums | ||
* @param {?} artistId Artists Spotify ID. | ||
* @return {?} | ||
*/ | ||
function (artistId) { | ||
return this.apiGet("/artists/" + artistId + "/albums", null, this.getHeaders()); | ||
}; | ||
/** @description Returns artists top tracks | ||
* @param artistId Artists Spotify ID. | ||
* @param countryCode Country code in 2 char Format. For example FI. Defaults to extracting country code from token. | ||
SpotifyRgService.prototype.setScopes = /** | ||
* @param {?} scopes | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns artists top tracks | ||
* @param {?} artistId Artists Spotify ID. | ||
* @param {?=} countryCode Country code in 2 char Format. For example FI. Defaults to extracting country code from token. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtistsTopTracks = /** | ||
* \@description Returns artists top tracks | ||
* @param {?} artistId Artists Spotify ID. | ||
* @param {?=} countryCode Country code in 2 char Format. For example FI. Defaults to extracting country code from token. | ||
* @return {?} | ||
*/ | ||
function (artistId, countryCode) { | ||
/** @type {?} */ | ||
var countryCode = (countryCode != null && countryCode.length == 2) ? countryCode : "from_token"; | ||
return this.apiGet("/artists/" + artistId + "/top-tracks?country=" + countryCode, null, this.getHeaders()); | ||
}; | ||
/** @description Returns users top tracks | ||
* @param timeRange The range of time results are returned from. Use short_term, medium_term or long_term. Defaults to long_term. | ||
* @param count Amount of tracks returned. Max value 50. Defaults to 50. | ||
function (scopes) { | ||
this.scopes = scopes; | ||
}; | ||
/** | ||
* @param {?} token | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Returns users top tracks | ||
* @param {?} timeRange The range of time results are returned from. Use short_term, medium_term or long_term. Defaults to long_term. | ||
* @param {?=} count Amount of tracks returned. Max value 50. Defaults to 50. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getUsersTopTracks = /** | ||
* \@description Returns users top tracks | ||
* @param {?} timeRange The range of time results are returned from. Use short_term, medium_term or long_term. Defaults to long_term. | ||
* @param {?=} count Amount of tracks returned. Max value 50. Defaults to 50. | ||
* @return {?} | ||
*/ | ||
function (timeRange, count) { | ||
/** @type {?} */ | ||
var params = { | ||
//set backup default values | ||
'time_range': timeRange == null ? 'long_term' : timeRange, | ||
'limit': count == null ? '50' : count | ||
}; | ||
return this.apiGet("/me/top/tracks", params, this.getHeaders()); | ||
}; | ||
/** @description Creates a playlist | ||
* @param userId Users spotify ID. | ||
* @param name A name for the playlist . | ||
* @param description A description for the playlist. | ||
* @param isPublic Defines if a playlist is public or private | ||
SpotifyRgService.prototype.setToken = /** | ||
* @param {?} token | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Creates a playlist | ||
* @param {?} userId Users spotify ID. | ||
* @param {?} name A name for the playlist . | ||
* @param {?} description A description for the playlist. | ||
* @param {?} isPublic Defines if a playlist is public or private | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.createPlayList = /** | ||
* \@description Creates a playlist | ||
* @param {?} userId Users spotify ID. | ||
* @param {?} name A name for the playlist . | ||
* @param {?} description A description for the playlist. | ||
* @param {?} isPublic Defines if a playlist is public or private | ||
* @return {?} | ||
*/ | ||
function (userId, name, description, isPublic) { | ||
/** @type {?} */ | ||
var body = { | ||
"name": name, | ||
"description": description, | ||
"public": isPublic | ||
}; | ||
return this.apiPost('/me/playlists?user_id=' + userId, body, this.getHeaders()); | ||
}; | ||
/** @description Adds tracks to playlist | ||
* @param playlistId Playlist ID. | ||
* @param trackUris Array of spotify track uris. Max 100 tracks can be added at a time. | ||
function (token) { | ||
this.token = token; | ||
}; | ||
/** @description Returns track | ||
* @param artistId Tracks Spotify ID | ||
*/ | ||
/** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
/** | ||
* \@description Adds tracks to playlist | ||
* @param {?} playListId | ||
* @param {?} trackUris Array of spotify track uris. Max 100 tracks can be added at a time. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.addTracksToPlaylist = /** | ||
* \@description Adds tracks to playlist | ||
* @param {?} playListId | ||
* @param {?} trackUris Array of spotify track uris. Max 100 tracks can be added at a time. | ||
* @return {?} | ||
*/ | ||
function (playListId, trackUris) { | ||
/** @type {?} */ | ||
var body = { | ||
"uris": trackUris, | ||
}; | ||
return this.apiPost('/playlists/' + playListId + '/tracks', body, this.getHeaders()); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} params | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.apiGet = /** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} params | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
function (endpoint, params, headers) { | ||
return this.http.get(this.baseUrl + endpoint, { | ||
params: params, | ||
headers: headers, | ||
withCredentials: false | ||
}).toPromise(); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} data | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.apiPost = /** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} data | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
function (endpoint, data, headers) { | ||
return this.http.post(this.baseUrl + endpoint, data, { | ||
headers: headers, | ||
}) | ||
.toPromise(); | ||
}; | ||
/** | ||
* @private | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getHeaders = /** | ||
* @private | ||
* @return {?} | ||
*/ | ||
function () { | ||
return { | ||
'Authorization': 'Bearer ' + this.token, | ||
'Accept': 'application/json', | ||
'Content-Type': 'application/json' | ||
}; | ||
}; | ||
SpotifyRgService.decorators = [ | ||
{ type: i0.Injectable, args: [{ | ||
providedIn: 'root' | ||
},] } | ||
]; | ||
/** @nocollapse */ | ||
SpotifyRgService.ctorParameters = function () { | ||
return [ | ||
{ type: i1.HttpClient } | ||
]; | ||
}; | ||
/** @nocollapse */ SpotifyRgService.ngInjectableDef = i0.defineInjectable({ factory: function SpotifyRgService_Factory() { return new SpotifyRgService(i0.inject(i1.HttpClient)); }, token: SpotifyRgService, providedIn: "root" }); | ||
return SpotifyRgService; | ||
}()); | ||
SpotifyRgService.prototype.getTrack = /** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
function (trackId) { | ||
return this.apiGet("/tracks/" + trackId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns tracks | ||
* @param artistId Comma separated list of track ID's in a string. | ||
*/ | ||
/** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getTracks = /** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
function (trackIds) { | ||
/** @type {?} */ | ||
var t = encodeURIComponent(trackIds); | ||
return this.apiGet("/tracks/?ids=" + t, null, this.getHeaders()); | ||
}; | ||
/** @description Returns album | ||
* @param artistId Albums Spotify ID. | ||
*/ | ||
/** | ||
* \@description Returns album | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getAlbum = /** | ||
* \@description Returns album | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
function (albumId) { | ||
return this.apiGet("/albums/" + albumId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns albums | ||
* @param artistId Comma separated list of album ID's in a string.. | ||
*/ | ||
/** | ||
* \@description Returns albums | ||
* @param {?} albumIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getAlbums = /** | ||
* \@description Returns albums | ||
* @param {?} albumIds | ||
* @return {?} | ||
*/ | ||
function (albumIds) { | ||
/** @type {?} */ | ||
var a = encodeURIComponent(albumIds); | ||
return this.apiGet("/albums/?ids=" + a, null, this.getHeaders()); | ||
}; | ||
/** @description Returns albums tracks | ||
* @param artistId Albums Spotify ID. | ||
*/ | ||
/** | ||
* \@description Returns albums tracks | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getAlbumsTracks = /** | ||
* \@description Returns albums tracks | ||
* @param {?} albumId | ||
* @return {?} | ||
*/ | ||
function (albumId) { | ||
return this.apiGet("/albums/" + albumId + "/tracks", null, this.getHeaders()); | ||
}; | ||
/** @description Returns artist | ||
* @param artistId Artists spotify ID. | ||
*/ | ||
/** | ||
* \@description Returns artist | ||
* @param {?} artistId Artists spotify ID. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtist = /** | ||
* \@description Returns artist | ||
* @param {?} artistId Artists spotify ID. | ||
* @return {?} | ||
*/ | ||
function (artistId) { | ||
return this.apiGet("/artists/" + artistId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns artists | ||
* @param artistId Comma separated list of artist ID's in a string. | ||
*/ | ||
/** | ||
* \@description Returns artists | ||
* @param {?} artistIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtists = /** | ||
* \@description Returns artists | ||
* @param {?} artistIds | ||
* @return {?} | ||
*/ | ||
function (artistIds) { | ||
/** @type {?} */ | ||
var a = encodeURIComponent(artistIds); | ||
return this.apiGet("/artists/?ids=" + a, null, this.getHeaders()); | ||
}; | ||
/** @description Returns artists albums | ||
* @param artistId Artists Spotify ID. | ||
*/ | ||
/** | ||
* \@description Returns artists albums | ||
* @param {?} artistId Artists Spotify ID. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtistsAlbums = /** | ||
* \@description Returns artists albums | ||
* @param {?} artistId Artists Spotify ID. | ||
* @return {?} | ||
*/ | ||
function (artistId) { | ||
return this.apiGet("/artists/" + artistId + "/albums", null, this.getHeaders()); | ||
}; | ||
/** @description Returns artists top tracks | ||
* @param artistId Artists Spotify ID. | ||
* @param countryCode Country code in 2 char Format. For example FI. Defaults to extracting country code from token. | ||
*/ | ||
/** | ||
* \@description Returns artists top tracks | ||
* @param {?} artistId Artists Spotify ID. | ||
* @param {?=} countryCode Country code in 2 char Format. For example FI. Defaults to extracting country code from token. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getArtistsTopTracks = /** | ||
* \@description Returns artists top tracks | ||
* @param {?} artistId Artists Spotify ID. | ||
* @param {?=} countryCode Country code in 2 char Format. For example FI. Defaults to extracting country code from token. | ||
* @return {?} | ||
*/ | ||
function (artistId, countryCode) { | ||
/** @type {?} */ | ||
var countryCode = (countryCode != null && countryCode.length == 2) ? countryCode : "from_token"; | ||
return this.apiGet("/artists/" + artistId + "/top-tracks?country=" + countryCode, null, this.getHeaders()); | ||
}; | ||
/** @description Returns users top tracks | ||
* @param timeRange The range of time results are returned from. Use short_term, medium_term or long_term. Defaults to long_term. | ||
* @param count Amount of tracks returned. Max value 50. Defaults to 50. | ||
*/ | ||
/** | ||
* \@description Returns users top tracks | ||
* @param {?} timeRange The range of time results are returned from. Use short_term, medium_term or long_term. Defaults to long_term. | ||
* @param {?=} count Amount of tracks returned. Max value 50. Defaults to 50. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getUsersTopTracks = /** | ||
* \@description Returns users top tracks | ||
* @param {?} timeRange The range of time results are returned from. Use short_term, medium_term or long_term. Defaults to long_term. | ||
* @param {?=} count Amount of tracks returned. Max value 50. Defaults to 50. | ||
* @return {?} | ||
*/ | ||
function (timeRange, count) { | ||
/** @type {?} */ | ||
var params = { | ||
//set backup default values | ||
'time_range': timeRange == null ? 'long_term' : timeRange, | ||
'limit': count == null ? '50' : count | ||
}; | ||
return this.apiGet("/me/top/tracks", params, this.getHeaders()); | ||
}; | ||
/** @description Returns users playlists | ||
* @param userId Users Spotify Id | ||
*/ | ||
/** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getUsersPlaylists = /** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
function (userId) { | ||
return this.apiGet('/users/' + userId + '/playlists', null, this.getHeaders()); | ||
}; | ||
/** @description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param seedArtists Comma separated list of artist seed Ids | ||
* @param seedTracks Comma separated list of track seed Ids | ||
*/ | ||
/** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getRecommendedTracks = /** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
function (seedArtists, seedTracks) { | ||
/** @type {?} */ | ||
var sA = encodeURIComponent(seedArtists); | ||
/** @type {?} */ | ||
var sT = encodeURIComponent(seedTracks); | ||
return this.apiGet('/recommendations?limit=50&seed_artists=' + sA + '&seed_tracks=' + sT, null, this.getHeaders()); | ||
}; | ||
/** @description Creates a playlist | ||
* @param userId Users spotify ID. | ||
* @param name A name for the playlist . | ||
* @param description A description for the playlist. | ||
* @param isPublic Defines if a playlist is public or private | ||
*/ | ||
/** | ||
* \@description Creates a playlist | ||
* @param {?} userId Users spotify ID. | ||
* @param {?} name A name for the playlist . | ||
* @param {?} description A description for the playlist. | ||
* @param {?} isPublic Defines if a playlist is public or private | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.createPlayList = /** | ||
* \@description Creates a playlist | ||
* @param {?} userId Users spotify ID. | ||
* @param {?} name A name for the playlist . | ||
* @param {?} description A description for the playlist. | ||
* @param {?} isPublic Defines if a playlist is public or private | ||
* @return {?} | ||
*/ | ||
function (userId, name, description, isPublic) { | ||
/** @type {?} */ | ||
var body = { | ||
"name": name, | ||
"description": description, | ||
"public": isPublic | ||
}; | ||
return this.apiPost('/me/playlists?user_id=' + userId, body, this.getHeaders()); | ||
}; | ||
/** @description Adds tracks to playlist | ||
* @param playlistId Playlist ID. | ||
* @param trackUris Array of spotify track uris. Max 100 tracks can be added at a time. | ||
*/ | ||
/** | ||
* \@description Adds tracks to playlist | ||
* @param {?} playListId | ||
* @param {?} trackUris Array of spotify track uris. Max 100 tracks can be added at a time. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.addTracksToPlaylist = /** | ||
* \@description Adds tracks to playlist | ||
* @param {?} playListId | ||
* @param {?} trackUris Array of spotify track uris. Max 100 tracks can be added at a time. | ||
* @return {?} | ||
*/ | ||
function (playListId, trackUris) { | ||
/** @type {?} */ | ||
var body = { | ||
"uris": trackUris, | ||
}; | ||
return this.apiPost('/playlists/' + playListId + '/tracks', body, this.getHeaders()); | ||
}; | ||
/** @description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param query Search word. | ||
* @param type A comma-separated list of item types to search across. Valid types are album, artist, playlist, and track. | ||
* @param count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
*/ | ||
/** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.search = /** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
function (query, types, count) { | ||
/** @type {?} */ | ||
var q = encodeURIComponent(query); | ||
/** @type {?} */ | ||
var t = encodeURIComponent(types); | ||
return this.apiGet('/search?q=' + q + '&type=' + t + '&limit=' + count, null, this.getHeaders()); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} params | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.apiGet = /** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} params | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
function (endpoint, params, headers) { | ||
return this.http.get(this.baseUrl + endpoint, { | ||
params: params, | ||
headers: headers, | ||
withCredentials: false | ||
}).toPromise(); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} data | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.apiPost = /** | ||
* @private | ||
* @param {?} endpoint | ||
* @param {?} data | ||
* @param {?} headers | ||
* @return {?} | ||
*/ | ||
function (endpoint, data, headers) { | ||
return this.http.post(this.baseUrl + endpoint, data, { | ||
headers: headers, | ||
}) | ||
.toPromise(); | ||
}; | ||
/** | ||
* @private | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getHeaders = /** | ||
* @private | ||
* @return {?} | ||
*/ | ||
function () { | ||
return { | ||
'Authorization': 'Bearer ' + this.token, | ||
'Accept': 'application/json', | ||
'Content-Type': 'application/json' | ||
}; | ||
}; | ||
SpotifyRgService.decorators = [ | ||
{ type: i0.Injectable, args: [{ | ||
providedIn: 'root' | ||
},] } | ||
]; | ||
/** @nocollapse */ | ||
SpotifyRgService.ctorParameters = function () { | ||
return [ | ||
{ type: i1.HttpClient } | ||
]; | ||
}; | ||
/** @nocollapse */ SpotifyRgService.ngInjectableDef = i0.defineInjectable({ factory: function SpotifyRgService_Factory() { return new SpotifyRgService(i0.inject(i1.HttpClient)); }, token: SpotifyRgService, providedIn: "root" }); | ||
return SpotifyRgService; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var SpotifyServiceRgModule = /** @class */ (function () { | ||
function SpotifyServiceRgModule() { | ||
} | ||
SpotifyServiceRgModule.decorators = [ | ||
{ type: i0.NgModule, args: [{ | ||
declarations: [], | ||
imports: [ | ||
i1.HttpClientModule | ||
], | ||
exports: [] | ||
},] } | ||
]; | ||
return SpotifyServiceRgModule; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var SpotifyServiceRgModule = /** @class */ (function () { | ||
function SpotifyServiceRgModule() { | ||
} | ||
SpotifyServiceRgModule.decorators = [ | ||
{ type: i0.NgModule, args: [{ | ||
declarations: [], | ||
imports: [ | ||
i1.HttpClientModule | ||
], | ||
exports: [] | ||
},] } | ||
]; | ||
return SpotifyServiceRgModule; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
exports.SpotifyRgService = SpotifyRgService; | ||
exports.SpotifyServiceRgModule = SpotifyServiceRgModule; | ||
exports.SpotifyRgService = SpotifyRgService; | ||
exports.SpotifyServiceRgModule = SpotifyServiceRgModule; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
@@ -378,0 +481,0 @@ }))); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("spotify-service-rg",["exports","@angular/core","@angular/common/http"],e):e(t["spotify-service-rg"]={},t.ng.core,t.ng.common.http)}(this,function(t,e,o){"use strict";var r=function(){function t(t){this.http=t,this.baseUrl="https://api.spotify.com/v1"}return t.prototype.login=function(){window.location.href="https://accounts.spotify.com/authorize?response_type=token&client_id="+this.clientId+(this.scopes?"&scope="+encodeURIComponent(this.scopes):"")+"&redirect_uri="+encodeURIComponent(this.callBackUrl)},t.prototype.setClientId=function(t){this.clientId=t},t.prototype.setCallBackUrl=function(t){this.callBackUrl=t},t.prototype.setScopes=function(t){this.scopes=t},t.prototype.setToken=function(t){this.token=t},t.prototype.getAlbum=function(t){return this.apiGet("/albums/"+t,null,this.getHeaders())},t.prototype.getAlbums=function(t){return this.apiGet("/albums/?ids="+t,null,this.getHeaders())},t.prototype.getAlbumsTracks=function(t){return this.apiGet("/albums/"+t+"/tracks",null,this.getHeaders())},t.prototype.getArtist=function(t){return this.apiGet("/artists/"+t,null,this.getHeaders())},t.prototype.getArtists=function(t){return this.apiGet("/artists/?ids="+t,null,this.getHeaders())},t.prototype.getArtistsAlbums=function(t){return this.apiGet("/artists/"+t+"/albums",null,this.getHeaders())},t.prototype.getArtistsTopTracks=function(t,e){e=null!=e&&2==e.length?e:"from_token";return this.apiGet("/artists/"+t+"/top-tracks?country="+e,null,this.getHeaders())},t.prototype.getUsersTopTracks=function(t,e){var o={time_range:null==t?"long_term":t,limit:null==e?"50":e};return this.apiGet("/me/top/tracks",o,this.getHeaders())},t.prototype.createPlayList=function(t,e,o,r){var i={name:e,description:o,"public":r};return this.apiPost("/me/playlists?user_id="+t,i,this.getHeaders())},t.prototype.addTracksToPlaylist=function(t,e){var o={uris:e};return this.apiPost("/playlists/"+t+"/tracks",o,this.getHeaders())},t.prototype.apiGet=function(t,e,o){return this.http.get(this.baseUrl+t,{params:e,headers:o,withCredentials:!1}).toPromise()},t.prototype.apiPost=function(t,e,o){return this.http.post(this.baseUrl+t,e,{headers:o}).toPromise()},t.prototype.getHeaders=function(){return{Authorization:"Bearer "+this.token,Accept:"application/json","Content-Type":"application/json"}},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:o.HttpClient}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(o.HttpClient))},token:t,providedIn:"root"}),t}(),i=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[],imports:[o.HttpClientModule],exports:[]}]}],t}();t.SpotifyRgService=r,t.SpotifyServiceRgModule=i,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("spotify-service-rg",["exports","@angular/core","@angular/common/http"],e):e(t["spotify-service-rg"]={},t.ng.core,t.ng.common.http)}(this,function(t,e,o){"use strict";var r=function(){function t(t){this.http=t,this.baseUrl="https://api.spotify.com/v1"}return t.prototype.login=function(){window.location.href="https://accounts.spotify.com/authorize?response_type=token&client_id="+this.clientId+(this.scopes?"&scope="+encodeURIComponent(this.scopes):"")+"&redirect_uri="+encodeURIComponent(this.callBackUrl)},t.prototype.setClientId=function(t){this.clientId=t},t.prototype.setCallBackUrl=function(t){this.callBackUrl=t},t.prototype.setScopes=function(t){this.scopes=t},t.prototype.setToken=function(t){this.token=t},t.prototype.getTrack=function(t){return this.apiGet("/tracks/"+t,null,this.getHeaders())},t.prototype.getTracks=function(t){var e=encodeURIComponent(t);return this.apiGet("/tracks/?ids="+e,null,this.getHeaders())},t.prototype.getAlbum=function(t){return this.apiGet("/albums/"+t,null,this.getHeaders())},t.prototype.getAlbums=function(t){var e=encodeURIComponent(t);return this.apiGet("/albums/?ids="+e,null,this.getHeaders())},t.prototype.getAlbumsTracks=function(t){return this.apiGet("/albums/"+t+"/tracks",null,this.getHeaders())},t.prototype.getArtist=function(t){return this.apiGet("/artists/"+t,null,this.getHeaders())},t.prototype.getArtists=function(t){var e=encodeURIComponent(t);return this.apiGet("/artists/?ids="+e,null,this.getHeaders())},t.prototype.getArtistsAlbums=function(t){return this.apiGet("/artists/"+t+"/albums",null,this.getHeaders())},t.prototype.getArtistsTopTracks=function(t,e){e=null!=e&&2==e.length?e:"from_token";return this.apiGet("/artists/"+t+"/top-tracks?country="+e,null,this.getHeaders())},t.prototype.getUsersTopTracks=function(t,e){var o={time_range:null==t?"long_term":t,limit:null==e?"50":e};return this.apiGet("/me/top/tracks",o,this.getHeaders())},t.prototype.getUsersPlaylists=function(t){return this.apiGet("/users/"+t+"/playlists",null,this.getHeaders())},t.prototype.getRecommendedTracks=function(t,e){var o=encodeURIComponent(t),r=encodeURIComponent(e);return this.apiGet("/recommendations?limit=50&seed_artists="+o+"&seed_tracks="+r,null,this.getHeaders())},t.prototype.createPlayList=function(t,e,o,r){var n={name:e,description:o,"public":r};return this.apiPost("/me/playlists?user_id="+t,n,this.getHeaders())},t.prototype.addTracksToPlaylist=function(t,e){var o={uris:e};return this.apiPost("/playlists/"+t+"/tracks",o,this.getHeaders())},t.prototype.search=function(t,e,o){var r=encodeURIComponent(t),n=encodeURIComponent(e);return this.apiGet("/search?q="+r+"&type="+n+"&limit="+o,null,this.getHeaders())},t.prototype.apiGet=function(t,e,o){return this.http.get(this.baseUrl+t,{params:e,headers:o,withCredentials:!1}).toPromise()},t.prototype.apiPost=function(t,e,o){return this.http.post(this.baseUrl+t,e,{headers:o}).toPromise()},t.prototype.getHeaders=function(){return{Authorization:"Bearer "+this.token,Accept:"application/json","Content-Type":"application/json"}},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:o.HttpClient}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(o.HttpClient))},token:t,providedIn:"root"}),t}(),n=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[],imports:[o.HttpClientModule],exports:[]}]}],t}();t.SpotifyRgService=r,t.SpotifyServiceRgModule=n,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=spotify-service-rg.umd.min.js.map |
@@ -57,2 +57,20 @@ /** | ||
/** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
getTrack(trackId) { | ||
return this.apiGet("/tracks/" + trackId, null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
getTracks(trackIds) { | ||
/** @type {?} */ | ||
const t = encodeURIComponent(trackIds); | ||
return this.apiGet("/tracks/?ids=" + t, null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Returns album | ||
@@ -71,3 +89,5 @@ * @param {?} albumId | ||
getAlbums(albumIds) { | ||
return this.apiGet("/albums/?ids=" + albumIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
const a = encodeURIComponent(albumIds); | ||
return this.apiGet("/albums/?ids=" + a, null, this.getHeaders()); | ||
} | ||
@@ -96,3 +116,5 @@ /** | ||
getArtists(artistIds) { | ||
return this.apiGet("/artists/?ids=" + artistIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
const a = encodeURIComponent(artistIds); | ||
return this.apiGet("/artists/?ids=" + a, null, this.getHeaders()); | ||
} | ||
@@ -134,2 +156,23 @@ /** | ||
/** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
getUsersPlaylists(userId) { | ||
return this.apiGet('/users/' + userId + '/playlists', null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
getRecommendedTracks(seedArtists, seedTracks) { | ||
/** @type {?} */ | ||
const sA = encodeURIComponent(seedArtists); | ||
/** @type {?} */ | ||
const sT = encodeURIComponent(seedTracks); | ||
return this.apiGet('/recommendations?limit=50&seed_artists=' + sA + '&seed_tracks=' + sT, null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Creates a playlist | ||
@@ -165,2 +208,16 @@ * @param {?} userId Users spotify ID. | ||
/** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
search(query, types, count) { | ||
/** @type {?} */ | ||
const q = encodeURIComponent(query); | ||
/** @type {?} */ | ||
const t = encodeURIComponent(types); | ||
return this.apiGet('/search?q=' + q + '&type=' + t + '&limit=' + count, null, this.getHeaders()); | ||
} | ||
/** | ||
* @private | ||
@@ -246,2 +303,2 @@ * @param {?} endpoint | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BvdGlmeS1yZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vc3BvdGlmeS1zZXJ2aWNlLXJnLyIsInNvdXJjZXMiOlsibGliL3Nwb3RpZnktcmcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7OztBQU9sRCxNQUFNLE9BQU8sZ0JBQWdCOzs7O0lBUTNCLFlBQTZCLElBQWdCO1FBQWhCLFNBQUksR0FBSixJQUFJLENBQVk7UUFOckMsWUFBTyxHQUFXLDRCQUE0QixDQUFDO0lBTU4sQ0FBQzs7OztJQUUzQyxLQUFLO1FBQ1YsTUFBTSxDQUFDLFFBQVEsQ0FBQyxJQUFJLEdBQUcsd0NBQXdDO1lBQzdELHNCQUFzQjtZQUN0QixhQUFhLEdBQUcsSUFBSSxDQUFDLFFBQVE7WUFDN0IsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQU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cy5odHRwLmdldCh0aGlzLmJhc2VVcmwgKyBlbmRwb2ludCwge1xuICAgICAgcGFyYW1zOiBwYXJhbXMsXG4gICAgICBoZWFkZXJzOiBoZWFkZXJzLFxuICAgICAgd2l0aENyZWRlbnRpYWxzOiBmYWxzZVxuICAgIH0pLnRvUHJvbWlzZSgpXG4gIH1cblxuICBwcml2YXRlIGFwaVBvc3QoZW5kcG9pbnQ6IHN0cmluZywgZGF0YSwgaGVhZGVycykge1xuICAgIHJldHVybiB0aGlzLmh0dHAucG9zdCh0aGlzLmJhc2VVcmwgKyBlbmRwb2ludCwgZGF0YSwge1xuICAgICAgaGVhZGVyczogaGVhZGVycyxcbiAgICB9KVxuICAgICAgLnRvUHJvbWlzZSgpO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRIZWFkZXJzKCkge1xuICAgIHJldHVybiB7XG4gICAgICAnQXV0aG9yaXphdGlvbic6ICdCZWFyZXIgJyArIHRoaXMudG9rZW4sXG4gICAgICAnQWNjZXB0JzogJ2FwcGxpY2F0aW9uL2pzb24nLFxuICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJ1xuICAgIH1cbiAgfVxufVxuIl19 |
@@ -75,2 +75,36 @@ /** | ||
}; | ||
/** @description Returns track | ||
* @param artistId Tracks Spotify ID | ||
*/ | ||
/** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getTrack = /** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
function (trackId) { | ||
return this.apiGet("/tracks/" + trackId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns tracks | ||
* @param artistId Comma separated list of track ID's in a string. | ||
*/ | ||
/** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getTracks = /** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
function (trackIds) { | ||
/** @type {?} */ | ||
var t = encodeURIComponent(trackIds); | ||
return this.apiGet("/tracks/?ids=" + t, null, this.getHeaders()); | ||
}; | ||
/** @description Returns album | ||
@@ -106,3 +140,5 @@ * @param artistId Albums Spotify ID. | ||
function (albumIds) { | ||
return this.apiGet("/albums/?ids=" + albumIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
var a = encodeURIComponent(albumIds); | ||
return this.apiGet("/albums/?ids=" + a, null, this.getHeaders()); | ||
}; | ||
@@ -155,3 +191,5 @@ /** @description Returns albums tracks | ||
function (artistIds) { | ||
return this.apiGet("/artists/?ids=" + artistIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
var a = encodeURIComponent(artistIds); | ||
return this.apiGet("/artists/?ids=" + a, null, this.getHeaders()); | ||
}; | ||
@@ -220,2 +258,41 @@ /** @description Returns artists albums | ||
}; | ||
/** @description Returns users playlists | ||
* @param userId Users Spotify Id | ||
*/ | ||
/** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getUsersPlaylists = /** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
function (userId) { | ||
return this.apiGet('/users/' + userId + '/playlists', null, this.getHeaders()); | ||
}; | ||
/** @description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param seedArtists Comma separated list of artist seed Ids | ||
* @param seedTracks Comma separated list of track seed Ids | ||
*/ | ||
/** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getRecommendedTracks = /** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
function (seedArtists, seedTracks) { | ||
/** @type {?} */ | ||
var sA = encodeURIComponent(seedArtists); | ||
/** @type {?} */ | ||
var sT = encodeURIComponent(seedTracks); | ||
return this.apiGet('/recommendations?limit=50&seed_artists=' + sA + '&seed_tracks=' + sT, null, this.getHeaders()); | ||
}; | ||
/** @description Creates a playlist | ||
@@ -275,3 +352,29 @@ * @param userId Users spotify ID. | ||
}; | ||
/** @description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param query Search word. | ||
* @param type A comma-separated list of item types to search across. Valid types are album, artist, playlist, and track. | ||
* @param count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
*/ | ||
/** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.search = /** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
function (query, types, count) { | ||
/** @type {?} */ | ||
var q = encodeURIComponent(query); | ||
/** @type {?} */ | ||
var t = encodeURIComponent(types); | ||
return this.apiGet('/search?q=' + q + '&type=' + t + '&limit=' + count, null, this.getHeaders()); | ||
}; | ||
/** | ||
* @private | ||
@@ -377,2 +480,2 @@ * @param {?} endpoint | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BvdGlmeS1yZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vc3BvdGlmeS1zZX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ICAgcmV0dXJuIHtcbiAgICAgICdBdXRob3JpemF0aW9uJzogJ0JlYXJlciAnICsgdGhpcy50b2tlbixcbiAgICAgICdBY2NlcHQnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXG4gICAgfVxuICB9XG59XG4iXX0= |
@@ -56,2 +56,20 @@ import { Injectable, NgModule, defineInjectable, inject } from '@angular/core'; | ||
/** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
getTrack(trackId) { | ||
return this.apiGet("/tracks/" + trackId, null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
getTracks(trackIds) { | ||
/** @type {?} */ | ||
const t = encodeURIComponent(trackIds); | ||
return this.apiGet("/tracks/?ids=" + t, null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Returns album | ||
@@ -70,3 +88,5 @@ * @param {?} albumId | ||
getAlbums(albumIds) { | ||
return this.apiGet("/albums/?ids=" + albumIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
const a = encodeURIComponent(albumIds); | ||
return this.apiGet("/albums/?ids=" + a, null, this.getHeaders()); | ||
} | ||
@@ -95,3 +115,5 @@ /** | ||
getArtists(artistIds) { | ||
return this.apiGet("/artists/?ids=" + artistIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
const a = encodeURIComponent(artistIds); | ||
return this.apiGet("/artists/?ids=" + a, null, this.getHeaders()); | ||
} | ||
@@ -133,2 +155,23 @@ /** | ||
/** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
getUsersPlaylists(userId) { | ||
return this.apiGet('/users/' + userId + '/playlists', null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
getRecommendedTracks(seedArtists, seedTracks) { | ||
/** @type {?} */ | ||
const sA = encodeURIComponent(seedArtists); | ||
/** @type {?} */ | ||
const sT = encodeURIComponent(seedTracks); | ||
return this.apiGet('/recommendations?limit=50&seed_artists=' + sA + '&seed_tracks=' + sT, null, this.getHeaders()); | ||
} | ||
/** | ||
* \@description Creates a playlist | ||
@@ -164,2 +207,16 @@ * @param {?} userId Users spotify ID. | ||
/** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
search(query, types, count) { | ||
/** @type {?} */ | ||
const q = encodeURIComponent(query); | ||
/** @type {?} */ | ||
const t = encodeURIComponent(types); | ||
return this.apiGet('/search?q=' + q + '&type=' + t + '&limit=' + count, null, this.getHeaders()); | ||
} | ||
/** | ||
* @private | ||
@@ -166,0 +223,0 @@ * @param {?} endpoint |
@@ -74,2 +74,36 @@ import { Injectable, NgModule, defineInjectable, inject } from '@angular/core'; | ||
}; | ||
/** @description Returns track | ||
* @param artistId Tracks Spotify ID | ||
*/ | ||
/** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getTrack = /** | ||
* \@description Returns track | ||
* @param {?} trackId | ||
* @return {?} | ||
*/ | ||
function (trackId) { | ||
return this.apiGet("/tracks/" + trackId, null, this.getHeaders()); | ||
}; | ||
/** @description Returns tracks | ||
* @param artistId Comma separated list of track ID's in a string. | ||
*/ | ||
/** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getTracks = /** | ||
* \@description Returns tracks | ||
* @param {?} trackIds | ||
* @return {?} | ||
*/ | ||
function (trackIds) { | ||
/** @type {?} */ | ||
var t = encodeURIComponent(trackIds); | ||
return this.apiGet("/tracks/?ids=" + t, null, this.getHeaders()); | ||
}; | ||
/** @description Returns album | ||
@@ -105,3 +139,5 @@ * @param artistId Albums Spotify ID. | ||
function (albumIds) { | ||
return this.apiGet("/albums/?ids=" + albumIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
var a = encodeURIComponent(albumIds); | ||
return this.apiGet("/albums/?ids=" + a, null, this.getHeaders()); | ||
}; | ||
@@ -154,3 +190,5 @@ /** @description Returns albums tracks | ||
function (artistIds) { | ||
return this.apiGet("/artists/?ids=" + artistIds, null, this.getHeaders()); | ||
/** @type {?} */ | ||
var a = encodeURIComponent(artistIds); | ||
return this.apiGet("/artists/?ids=" + a, null, this.getHeaders()); | ||
}; | ||
@@ -219,2 +257,41 @@ /** @description Returns artists albums | ||
}; | ||
/** @description Returns users playlists | ||
* @param userId Users Spotify Id | ||
*/ | ||
/** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getUsersPlaylists = /** | ||
* \@description Returns users playlists | ||
* @param {?} userId Users Spotify Id | ||
* @return {?} | ||
*/ | ||
function (userId) { | ||
return this.apiGet('/users/' + userId + '/playlists', null, this.getHeaders()); | ||
}; | ||
/** @description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param seedArtists Comma separated list of artist seed Ids | ||
* @param seedTracks Comma separated list of track seed Ids | ||
*/ | ||
/** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.getRecommendedTracks = /** | ||
* \@description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param {?} seedArtists Comma separated list of artist seed Ids | ||
* @param {?} seedTracks Comma separated list of track seed Ids | ||
* @return {?} | ||
*/ | ||
function (seedArtists, seedTracks) { | ||
/** @type {?} */ | ||
var sA = encodeURIComponent(seedArtists); | ||
/** @type {?} */ | ||
var sT = encodeURIComponent(seedTracks); | ||
return this.apiGet('/recommendations?limit=50&seed_artists=' + sA + '&seed_tracks=' + sT, null, this.getHeaders()); | ||
}; | ||
/** @description Creates a playlist | ||
@@ -274,3 +351,29 @@ * @param userId Users spotify ID. | ||
}; | ||
/** @description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param query Search word. | ||
* @param type A comma-separated list of item types to search across. Valid types are album, artist, playlist, and track. | ||
* @param count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
*/ | ||
/** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
SpotifyRgService.prototype.search = /** | ||
* \@description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param {?} query Search word. | ||
* @param {?} types | ||
* @param {?} count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
* @return {?} | ||
*/ | ||
function (query, types, count) { | ||
/** @type {?} */ | ||
var q = encodeURIComponent(query); | ||
/** @type {?} */ | ||
var t = encodeURIComponent(types); | ||
return this.apiGet('/search?q=' + q + '&type=' + t + '&limit=' + count, null, this.getHeaders()); | ||
}; | ||
/** | ||
* @private | ||
@@ -277,0 +380,0 @@ * @param {?} endpoint |
@@ -15,2 +15,10 @@ import { HttpClient } from '@angular/common/http'; | ||
setToken(token: string): void; | ||
/** @description Returns track | ||
* @param artistId Tracks Spotify ID | ||
*/ | ||
getTrack(trackId: string): Promise<Object>; | ||
/** @description Returns tracks | ||
* @param artistId Comma separated list of track ID's in a string. | ||
*/ | ||
getTracks(trackIds: string): Promise<Object>; | ||
/** @description Returns album | ||
@@ -50,2 +58,11 @@ * @param artistId Albums Spotify ID. | ||
getUsersTopTracks(timeRange: any, count?: string): any; | ||
/** @description Returns users playlists | ||
* @param userId Users Spotify Id | ||
*/ | ||
getUsersPlaylists(userId: string): Promise<Object>; | ||
/** @description Returns recommendations based on seeds. Max 5 seeds allowed (thats total so for example 3 artists and 2 tracks) | ||
* @param seedArtists Comma separated list of artist seed Ids | ||
* @param seedTracks Comma separated list of track seed Ids | ||
*/ | ||
getRecommendedTracks(seedArtists: string, seedTracks: string): any; | ||
/** @description Creates a playlist | ||
@@ -63,2 +80,8 @@ * @param userId Users spotify ID. | ||
addTracksToPlaylist(playListId: string, trackUris: string[]): Promise<Object>; | ||
/** @description Returns Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. | ||
* @param query Search word. | ||
* @param type A comma-separated list of item types to search across. Valid types are album, artist, playlist, and track. | ||
* @param count The count is applied within each type, not on the total response. So count 3 with type album,track returns 3 albums and 3 tracks. Max 50. | ||
*/ | ||
search(query: string, types: string, count: string): Promise<Object>; | ||
private apiGet; | ||
@@ -65,0 +88,0 @@ private apiPost; |
{ | ||
"name": "spotify-service-rg", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "This is a Angular service for connecting to and using Spotify API.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"SpotifyRgService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":16,"character":37}]}],"login":[{"__symbolic":"method"}],"setClientId":[{"__symbolic":"method"}],"setCallBackUrl":[{"__symbolic":"method"}],"setScopes":[{"__symbolic":"method"}],"setToken":[{"__symbolic":"method"}],"getAlbum":[{"__symbolic":"method"}],"getAlbums":[{"__symbolic":"method"}],"getAlbumsTracks":[{"__symbolic":"method"}],"getArtist":[{"__symbolic":"method"}],"getArtists":[{"__symbolic":"method"}],"getArtistsAlbums":[{"__symbolic":"method"}],"getArtistsTopTracks":[{"__symbolic":"method"}],"getUsersTopTracks":[{"__symbolic":"method"}],"createPlayList":[{"__symbolic":"method"}],"addTracksToPlaylist":[{"__symbolic":"method"}],"apiGet":[{"__symbolic":"method"}],"apiPost":[{"__symbolic":"method"}],"getHeaders":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"SpotifyServiceRgModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":8,"character":4}],"exports":[]}]}],"members":{}}},"origins":{"SpotifyRgService":"./lib/spotify-rg.service","SpotifyServiceRgModule":"./lib/spotify-service-rg.module"},"importAs":"spotify-service-rg"} | ||
{"__symbolic":"module","version":4,"metadata":{"SpotifyRgService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":16,"character":37}]}],"login":[{"__symbolic":"method"}],"setClientId":[{"__symbolic":"method"}],"setCallBackUrl":[{"__symbolic":"method"}],"setScopes":[{"__symbolic":"method"}],"setToken":[{"__symbolic":"method"}],"getTrack":[{"__symbolic":"method"}],"getTracks":[{"__symbolic":"method"}],"getAlbum":[{"__symbolic":"method"}],"getAlbums":[{"__symbolic":"method"}],"getAlbumsTracks":[{"__symbolic":"method"}],"getArtist":[{"__symbolic":"method"}],"getArtists":[{"__symbolic":"method"}],"getArtistsAlbums":[{"__symbolic":"method"}],"getArtistsTopTracks":[{"__symbolic":"method"}],"getUsersTopTracks":[{"__symbolic":"method"}],"getUsersPlaylists":[{"__symbolic":"method"}],"getRecommendedTracks":[{"__symbolic":"method"}],"createPlayList":[{"__symbolic":"method"}],"addTracksToPlaylist":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"apiGet":[{"__symbolic":"method"}],"apiPost":[{"__symbolic":"method"}],"getHeaders":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"SpotifyServiceRgModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":8,"character":4}],"exports":[]}]}],"members":{}}},"origins":{"SpotifyRgService":"./lib/spotify-rg.service","SpotifyServiceRgModule":"./lib/spotify-service-rg.module"},"importAs":"spotify-service-rg"} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171047
2180