spotify-light-api
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SpotifyLightApi=e():t.SpotifyLightApi=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t,e){return this.request("".concat(this.apiURL,"/search?q=").concat(e,"&type=").concat(t))}n.r(e);var o="https://api.spotify.com/v1",i=("'Bearer ".concat("BQBxMLxjWJ5ExJBq4f8JGmz9H8POsVX3XW7AkmeGrxLLxVtpTGOLbuGqqabLOb7W7cI2C-JgCNffjLZfJW8E4Qgs6VYWFUyRHNoCAhSoMCgYBnDBWiMc8Jb274gy1FQgb7RWh1yoNvsmUA","'"),function(t){return t.json()});function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"default",function(){return a});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiURL=e.apiURL||o,this.token=e.token,this.albums=function(){var t=this;return{album:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e))},albums:function(e){return t.request("".concat(t.apiURL,"/albums/?ids=").concat(e))},tracks:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e,"/tracks"))}}}.bind(this)(),this.search=function(){return{artists:r.bind(this,"artist"),albums:r.bind(this,"album"),playlists:r.bind(this,"playlist"),tracks:r.bind(this,"track")}}.bind(this)()}var e,n,a;return e=t,(n=[{key:"request",value:function(t){var e={headers:{Authorization:"'Bearer ".concat(this.token,"'")}};return fetch(t,e).then(i)}}])&&u(e.prototype,n),a&&u(e,a),t}()}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SpotifyLightApi=e():t.SpotifyLightApi=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t,e){return this.request("".concat(this.apiURL,"/search?q=").concat(e,"&type=").concat(t))}n.r(e);var o="https://api.spotify.com/v1",i=function(t){return t.json()};function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"default",function(){return a});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiURL=e.apiURL||o,this.token=e.token,this.albums=function(){var t=this;return{album:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e))},albums:function(e){return t.request("".concat(t.apiURL,"/albums/?ids=").concat(e))},tracks:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e,"/tracks"))}}}.bind(this)(),this.search=function(){return{artists:r.bind(this,"artist"),albums:r.bind(this,"album"),playlists:r.bind(this,"playlist"),tracks:r.bind(this,"track")}}.bind(this)()}var e,n,a;return e=t,(n=[{key:"request",value:function(t){var e={headers:{Authorization:"'Bearer ".concat(this.token,"'")}};return fetch(t,e).then(i)}}])&&u(e.prototype,n),a&&u(e,a),t}()}])}); | ||
//# sourceMappingURL=spotify-light-api.umd.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SpotifyLightApi=e():t.SpotifyLightApi=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t,e){return this.request("".concat(this.apiURL,"/search?q=").concat(e,"&type=").concat(t))}n.r(e);var o="https://api.spotify.com/v1",i=("'Bearer ".concat("BQBxMLxjWJ5ExJBq4f8JGmz9H8POsVX3XW7AkmeGrxLLxVtpTGOLbuGqqabLOb7W7cI2C-JgCNffjLZfJW8E4Qgs6VYWFUyRHNoCAhSoMCgYBnDBWiMc8Jb274gy1FQgb7RWh1yoNvsmUA","'"),function(t){return t.json()});function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"default",function(){return a});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiURL=e.apiURL||o,this.token=e.token,this.albums=function(){var t=this;return{album:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e))},albums:function(e){return t.request("".concat(t.apiURL,"/albums/?ids=").concat(e))},tracks:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e,"/tracks"))}}}.bind(this)(),this.search=function(){return{artists:r.bind(this,"artist"),albums:r.bind(this,"album"),playlists:r.bind(this,"playlist"),tracks:r.bind(this,"track")}}.bind(this)()}var e,n,a;return e=t,(n=[{key:"request",value:function(t){var e={headers:{Authorization:"'Bearer ".concat(this.token,"'")}};return fetch(t,e).then(i)}}])&&u(e.prototype,n),a&&u(e,a),t}()}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SpotifyLightApi=e():t.SpotifyLightApi=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t,e){return this.request("".concat(this.apiURL,"/search?q=").concat(e,"&type=").concat(t))}n.r(e);var o="https://api.spotify.com/v1",i=function(t){return t.json()};function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"default",function(){return a});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiURL=e.apiURL||o,this.token=e.token,this.albums=function(){var t=this;return{album:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e))},albums:function(e){return t.request("".concat(t.apiURL,"/albums/?ids=").concat(e))},tracks:function(e){return t.request("".concat(t.apiURL,"/albums/").concat(e,"/tracks"))}}}.bind(this)(),this.search=function(){return{artists:r.bind(this,"artist"),albums:r.bind(this,"album"),playlists:r.bind(this,"playlist"),tracks:r.bind(this,"track")}}.bind(this)()}var e,n,a;return e=t,(n=[{key:"request",value:function(t){var e={headers:{Authorization:"'Bearer ".concat(this.token,"'")}};return fetch(t,e).then(i)}}])&&u(e.prototype,n),a&&u(e,a),t}()}])}); | ||
//# sourceMappingURL=spotify-light-api.umd.min.js.map |
@@ -6,11 +6,4 @@ "use strict"; | ||
}); | ||
exports.HEADERS = exports.API_URL = void 0; | ||
exports.API_URL = void 0; | ||
var API_URL = 'https://api.spotify.com/v1'; | ||
exports.API_URL = API_URL; | ||
var API_TOKEN = 'BQBxMLxjWJ5ExJBq4f8JGmz9H8POsVX3XW7AkmeGrxLLxVtpTGOLbuGqqabLOb7W7cI2C-JgCNffjLZfJW8E4Qgs6VYWFUyRHNoCAhSoMCgYBnDBWiMc8Jb274gy1FQgb7RWh1yoNvsmUA'; | ||
var HEADERS = { | ||
headers: { | ||
Authorization: "'Bearer ".concat(API_TOKEN, "'") | ||
} | ||
}; | ||
exports.HEADERS = HEADERS; | ||
exports.API_URL = API_URL; |
@@ -8,7 +8,7 @@ "use strict"; | ||
var _search = _interopRequireDefault(require("../src/search")); | ||
var _search = _interopRequireDefault(require("./search")); | ||
var _albums = _interopRequireDefault(require("./albums")); | ||
var _config = require("../src/config"); | ||
var _config = require("./config"); | ||
@@ -15,0 +15,0 @@ var _utils = require("./utils"); |
{ | ||
"name": "spotify-light-api", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "a simple lib to wrapper spotify api", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
26138
104