diff --git a/dist/spotify-wrapper.umd.js.map b/dist/spotify-wrapper.umd.js.map index d7d719f..76c3dc7 100644 --- a/dist/spotify-wrapper.umd.js.map +++ b/dist/spotify-wrapper.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 1fe837295a33034e3d48","webpack:///./index.js","webpack:///./src/index.js","webpack:///./src/search.js","webpack:///./src/album.js","webpack:///./src/artist.js","webpack:///./src/config.js","webpack:///./src/utils.js"],"names":["SpotifyWrapper","options","apiURL","token","album","bind","search","artist","url","headers","method","Accept","Authorization","fetch","then","searchAll","type","query","queryStr","replace","typeConcat","toString","request","searchAlbums","searchArtists","searchPlaylists","searchTracks","getAlbum","id","getAlbums","ids","getTracks","getArtist","getArtists","getArtistAlbums","tipo","getArtistTopTracks","getArtistRelated","API_URL","toJSON","data","json"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AC7DA;;;;;;;;;;;;;;;;ACAA;;;;AACA;;;;AACA;;;;AAEA;;AACA;;;;;;IAEqBA,c;AACnB,0BAAYC,OAAZ,EAAqB;AAAA;;AACnB,SAAKC,MAAL,GAAcD,QAAQC,MAAR,mBAAd;AACA,SAAKC,KAAL,GAAaF,QAAQE,KAArB;;AAEA,SAAKC,KAAL,GAAa,gBAAMC,IAAN,CAAW,IAAX,GAAb;AACA,SAAKC,MAAL,GAAc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AAN;AAAA;AAHN,GAAP;AAKD,C;;;;;;;;;;;;kBCNuBrB,M;AAAT,SAASA,MAAT,GAAkB;AAAA;;AAC/B,SAAO;AACLyB,eAAW;AAAA,aAAM,MAAKV,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,CAAN;AAAA,KADN;AAELK,gBAAY;AAAA,aAAO,MAAKX,OAAL,CAAgB,MAAKpB,MAArB,sBAA4C4B,GAA5C,CAAP;AAAA,KAFP;AAGLI,qBAAiB,yBAACN,EAAD,EAAKO,IAAL,EAAc;AAC7B,UAAI,CAACA,IAAL,EAAW,OAAO,MAAKb,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,aAAP;AACX,aAAO,MAAKN,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,2BAA+DO,IAA/D,CAAP;AACD,KANI;AAOLC,wBAAoB;AAAA,aAAM,MAAKd,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,iBAAN;AAAA,KAPf;AAQLS,sBAAkB;AAAA,aAAM,MAAKf,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,sBAAN;AAAA;AARb,GAAP;AAUD,C;;;;;;;;;;;;ACXM,IAAMU,4BAAU,4BAAhB;kBACQA,O;;;;;;;;;;;;ACDR,IAAMC,0BAAS,SAATA,MAAS;AAAA,SAAQC,KAAKC,IAAL,EAAR;AAAA,CAAf;kBACQF,M","file":"spotify-wrapper.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpotifyWrapper\"] = factory();\n\telse\n\t\troot[\"SpotifyWrapper\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1fe837295a33034e3d48","module.exports = require('./src/index').default;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","import search from './search';\r\nimport album from './album';\r\nimport artist from './artist';\r\n\r\nimport { API_URL } from '../src/config';\r\nimport { toJSON } from '../src/utils';\r\n\r\nexport default class SpotifyWrapper {\r\n constructor(options) {\r\n this.apiURL = options.apiURL || API_URL;\r\n this.token = options.token;\r\n\r\n this.album = album.bind(this)();\r\n this.search = search.bind(this)();\r\n this.artist = artist.bind(this)();\r\n }\r\n\r\n request(url) {\r\n const headers = {\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n Authorization: `Bearer ${this.token}`,\r\n },\r\n };\r\n\r\n return fetch(url, headers).then(toJSON);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","function searchAll(type, query) {\r\n const queryStr = query.replace(/ /g, '+');\r\n const typeConcat = type.toString();\r\n return this.request(`${this.apiURL}/search?q=${queryStr}&type=${typeConcat}`);\r\n}\r\n\r\nexport default function search() {\r\n return {\r\n searchAlbums: searchAll.bind(this, 'album'),\r\n searchArtists: searchAll.bind(this, 'artist'),\r\n searchPlaylists: searchAll.bind(this, 'playlist'),\r\n searchTracks: searchAll.bind(this, 'track'),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/search.js","export default function album() {\r\n return {\r\n getAlbum: id => this.request(`${this.apiURL}/albums/${id}`),\r\n getAlbums: ids => this.request(`${this.apiURL}/albums/?ids=${ids}`),\r\n getTracks: id => this.request(`${this.apiURL}/albums/${id}/tracks`),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/album.js","export default function artist() {\r\n return {\r\n getArtist: id => this.request(`${this.apiURL}/artists/${id}`),\r\n getArtists: ids => this.request(`${this.apiURL}/artists/?ids=${ids}`),\r\n getArtistAlbums: (id, tipo) => {\r\n if (!tipo) return this.request(`${this.apiURL}/artists/${id}/albums`)\r\n return this.request(`${this.apiURL}/artists/${id}/albums?album_type=${tipo}`)\r\n },\r\n getArtistTopTracks: id => this.request(`${this.apiURL}/artists/${id}/top-tracks`),\r\n getArtistRelated: id => this.request(`${this.apiURL}/artists/${id}/related-artists`)\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/artist.js","export const API_URL = 'https://api.spotify.com/v1';\r\nexport default API_URL;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/config.js","export const toJSON = data => data.json();\r\nexport default toJSON;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 8b06749a57aab1317078","webpack:///./index.js","webpack:///./src/index.js","webpack:///./src/search.js","webpack:///./src/album.js","webpack:///./src/artist.js","webpack:///./src/config.js","webpack:///./src/utils.js"],"names":["SpotifyWrapper","options","apiURL","token","album","bind","search","artist","url","headers","method","Accept","Authorization","fetch","then","searchAll","type","query","queryStr","replace","typeConcat","toString","request","searchAlbums","searchArtists","searchPlaylists","searchTracks","getAlbum","id","getAlbums","ids","getTracks","getArtist","getArtists","getArtistAlbums","tipo","getArtistTopTracks","getArtistRelated","API_URL","toJSON","data","json"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AC7DA;;;;;;;;;;;;;;;;ACAA;;;;AACA;;;;AACA;;;;AAEA;;AACA;;;;;;IAEqBA,c;AACnB,0BAAYC,OAAZ,EAAqB;AAAA;;AACnB,SAAKC,MAAL,GAAcD,QAAQC,MAAR,mBAAd;AACA,SAAKC,KAAL,GAAaF,QAAQE,KAArB;;AAEA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LC,eAAW;AAAA,aAAM,MAAKT,OAAL,CAAgB,MAAKpB,MAArB,gBAAsC0B,EAAtC,aAAN;AAAA;AAHN,GAAP;AAKD,C;;;;;;;;;;;;kBCNuBrB,M;AAAT,SAASA,MAAT,GAAkB;AAAA;;AAC/B,SAAO;AACLyB,eAAW;AAAA,aAAM,MAAKV,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,CAAN;AAAA,KADN;AAELK,gBAAY;AAAA,aAAO,MAAKX,OAAL,CAAgB,MAAKpB,MAArB,sBAA4C4B,GAA5C,CAAP;AAAA,KAFP;AAGLI,qBAAiB,yBAACN,EAAD,EAAKO,IAAL,EAAc;AAC7B,UAAI,CAACA,IAAL,EAAW,OAAO,MAAKb,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,aAAP;AACX,aAAO,MAAKN,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,2BAA+DO,IAA/D,CAAP;AACD,KANI;AAOLC,wBAAoB;AAAA,aAAM,MAAKd,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,iBAAN;AAAA,KAPf;AAQLS,sBAAkB;AAAA,aAAM,MAAKf,OAAL,CAAgB,MAAKpB,MAArB,iBAAuC0B,EAAvC,sBAAN;AAAA;AARb,GAAP;AAUD,C;;;;;;;;;;;;ACXM,IAAMU,4BAAU,4BAAhB;kBACQA,O;;;;;;;;;;;;ACDR,IAAMC,0BAAS,SAATA,MAAS;AAAA,SAAQC,KAAKC,IAAL,EAAR;AAAA,CAAf;kBACQF,M","file":"spotify-wrapper.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpotifyWrapper\"] = factory();\n\telse\n\t\troot[\"SpotifyWrapper\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8b06749a57aab1317078","module.exports = require('./src/index').default;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","import search from './search';\r\nimport album from './album';\r\nimport artist from './artist';\r\n\r\nimport { API_URL } from './config';\r\nimport { toJSON } from './utils';\r\n\r\nexport default class SpotifyWrapper {\r\n constructor(options) {\r\n this.apiURL = options.apiURL || API_URL;\r\n this.token = options.token;\r\n\r\n this.album = album.bind(this)();\r\n this.search = search.bind(this)();\r\n this.artist = artist.bind(this)();\r\n }\r\n\r\n request(url) {\r\n const headers = {\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n Authorization: `Bearer ${this.token}`,\r\n },\r\n };\r\n\r\n return fetch(url, headers).then(toJSON);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","function searchAll(type, query) {\r\n const queryStr = query.replace(/ /g, '+');\r\n const typeConcat = type.toString();\r\n return this.request(`${this.apiURL}/search?q=${queryStr}&type=${typeConcat}`);\r\n}\r\n\r\nexport default function search() {\r\n return {\r\n searchAlbums: searchAll.bind(this, 'album'),\r\n searchArtists: searchAll.bind(this, 'artist'),\r\n searchPlaylists: searchAll.bind(this, 'playlist'),\r\n searchTracks: searchAll.bind(this, 'track'),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/search.js","export default function album() {\r\n return {\r\n getAlbum: id => this.request(`${this.apiURL}/albums/${id}`),\r\n getAlbums: ids => this.request(`${this.apiURL}/albums/?ids=${ids}`),\r\n getTracks: id => this.request(`${this.apiURL}/albums/${id}/tracks`),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/album.js","export default function artist() {\r\n return {\r\n getArtist: id => this.request(`${this.apiURL}/artists/${id}`),\r\n getArtists: ids => this.request(`${this.apiURL}/artists/?ids=${ids}`),\r\n getArtistAlbums: (id, tipo) => {\r\n if (!tipo) return this.request(`${this.apiURL}/artists/${id}/albums`)\r\n return this.request(`${this.apiURL}/artists/${id}/albums?album_type=${tipo}`)\r\n },\r\n getArtistTopTracks: id => this.request(`${this.apiURL}/artists/${id}/top-tracks`),\r\n getArtistRelated: id => this.request(`${this.apiURL}/artists/${id}/related-artists`)\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/artist.js","export const API_URL = 'https://api.spotify.com/v1';\r\nexport default API_URL;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/config.js","export const toJSON = data => data.json();\r\nexport default toJSON;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/spotify-wrapper.umd.min.js.map b/dist/spotify-wrapper.umd.min.js.map index 71a50f3..46faa13 100644 --- a/dist/spotify-wrapper.umd.min.js.map +++ b/dist/spotify-wrapper.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///spotify-wrapper.umd.min.js","webpack:///webpack/bootstrap aebae11e1a05c4d19e64","webpack:///./index.js","webpack:///./src/index.js","webpack:///./src/search.js","webpack:///./src/album.js","webpack:///./src/artist.js","webpack:///./src/config.js","webpack:///./src/utils.js"],"names":["root","factory","exports","module","define","amd","self","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","default","_interopRequireDefault","obj","_classCallCheck","instance","Constructor","TypeError","value","_createClass","defineProperties","target","props","length","descriptor","writable","key","protoProps","staticProps","_search","_search2","_album","_album2","_artist","_artist2","_config","_utils","SpotifyWrapper","options","apiURL","API_URL","token","album","bind","search","artist","url","headers","method","Accept","Authorization","fetch","then","toJSON","searchAll","type","query","queryStr","replace","typeConcat","toString","request","searchAlbums","searchArtists","searchPlaylists","searchTracks","_this","getAlbum","id","getAlbums","ids","getTracks","getArtist","getArtists","getArtistAlbums","tipo","getArtistTopTracks","getArtistRelated","data","json"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,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AUjE,EAAQD,EAASO,GAEjC,YAGAY,QAAOC,eAAepB,EAAS,cAC7BuC,OAAO,GOlPF,IAAMsB,aAAU,4BPqPvB7D,GAAQgC,QOpPO6B,GPwPT,SAAU5D,EAAQD,EAASO,GAEjC,YAGAY,QAAOC,eAAepB,EAAS,cAC7BuC,OAAO,GQ/PF,IAAMmC,YAAS,SAAAyB,GAAA,MAAQA,GAAKC,ORoQnCpG,GAAQgC,QQnQO0C","file":"spotify-wrapper.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpotifyWrapper\"] = factory();\n\telse\n\t\troot[\"SpotifyWrapper\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpotifyWrapper\"] = factory();\n\telse\n\t\troot[\"SpotifyWrapper\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1).default;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _search = __webpack_require__(2);\n\nvar _search2 = _interopRequireDefault(_search);\n\nvar _album = __webpack_require__(3);\n\nvar _album2 = _interopRequireDefault(_album);\n\nvar _artist = __webpack_require__(4);\n\nvar _artist2 = _interopRequireDefault(_artist);\n\nvar _config = __webpack_require__(5);\n\nvar _utils = __webpack_require__(6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SpotifyWrapper = function () {\n function SpotifyWrapper(options) {\n _classCallCheck(this, SpotifyWrapper);\n\n this.apiURL = options.apiURL || _config.API_URL;\n this.token = options.token;\n\n this.album = _album2.default.bind(this)();\n this.search = _search2.default.bind(this)();\n this.artist = _artist2.default.bind(this)();\n }\n\n _createClass(SpotifyWrapper, [{\n key: 'request',\n value: function request(url) {\n var headers = {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n Authorization: 'Bearer ' + this.token\n }\n };\n\n return fetch(url, headers).then(_utils.toJSON);\n }\n }]);\n\n return SpotifyWrapper;\n}();\n\nexports.default = SpotifyWrapper;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = search;\nfunction searchAll(type, query) {\n var queryStr = query.replace(/ /g, '+');\n var typeConcat = type.toString();\n return this.request(this.apiURL + '/search?q=' + queryStr + '&type=' + typeConcat);\n}\n\nfunction search() {\n return {\n searchAlbums: searchAll.bind(this, 'album'),\n searchArtists: searchAll.bind(this, 'artist'),\n searchPlaylists: searchAll.bind(this, 'playlist'),\n searchTracks: searchAll.bind(this, 'track')\n };\n}\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = album;\nfunction album() {\n var _this = this;\n\n return {\n getAlbum: function getAlbum(id) {\n return _this.request(_this.apiURL + \"/albums/\" + id);\n },\n getAlbums: function getAlbums(ids) {\n return _this.request(_this.apiURL + \"/albums/?ids=\" + ids);\n },\n getTracks: function getTracks(id) {\n return _this.request(_this.apiURL + \"/albums/\" + id + \"/tracks\");\n }\n };\n}\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = artist;\nfunction artist() {\n var _this = this;\n\n return {\n getArtist: function getArtist(id) {\n return _this.request(_this.apiURL + \"/artists/\" + id);\n },\n getArtists: function getArtists(ids) {\n return _this.request(_this.apiURL + \"/artists/?ids=\" + ids);\n },\n getArtistAlbums: function getArtistAlbums(id, tipo) {\n if (!tipo) return _this.request(_this.apiURL + \"/artists/\" + id + \"/albums\");\n return _this.request(_this.apiURL + \"/artists/\" + id + \"/albums?album_type=\" + tipo);\n },\n getArtistTopTracks: function getArtistTopTracks(id) {\n return _this.request(_this.apiURL + \"/artists/\" + id + \"/top-tracks\");\n },\n getArtistRelated: function getArtistRelated(id) {\n return _this.request(_this.apiURL + \"/artists/\" + id + \"/related-artists\");\n }\n };\n}\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar API_URL = exports.API_URL = 'https://api.spotify.com/v1';\nexports.default = API_URL;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar toJSON = exports.toJSON = function toJSON(data) {\n return data.json();\n};\nexports.default = toJSON;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// spotify-wrapper.umd.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap aebae11e1a05c4d19e64","module.exports = require('./src/index').default;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","import search from './search';\r\nimport album from './album';\r\nimport artist from './artist';\r\n\r\nimport { API_URL } from '../src/config';\r\nimport { toJSON } from '../src/utils';\r\n\r\nexport default class SpotifyWrapper {\r\n constructor(options) {\r\n this.apiURL = options.apiURL || API_URL;\r\n this.token = options.token;\r\n\r\n this.album = album.bind(this)();\r\n this.search = search.bind(this)();\r\n this.artist = artist.bind(this)();\r\n }\r\n\r\n request(url) {\r\n const headers = {\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n Authorization: `Bearer ${this.token}`,\r\n },\r\n };\r\n\r\n return fetch(url, headers).then(toJSON);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","function searchAll(type, query) {\r\n const queryStr = query.replace(/ /g, '+');\r\n const typeConcat = type.toString();\r\n return this.request(`${this.apiURL}/search?q=${queryStr}&type=${typeConcat}`);\r\n}\r\n\r\nexport default function search() {\r\n return {\r\n searchAlbums: searchAll.bind(this, 'album'),\r\n searchArtists: searchAll.bind(this, 'artist'),\r\n searchPlaylists: searchAll.bind(this, 'playlist'),\r\n searchTracks: searchAll.bind(this, 'track'),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/search.js","export default function album() {\r\n return {\r\n getAlbum: id => this.request(`${this.apiURL}/albums/${id}`),\r\n getAlbums: ids => this.request(`${this.apiURL}/albums/?ids=${ids}`),\r\n getTracks: id => this.request(`${this.apiURL}/albums/${id}/tracks`),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/album.js","export default function artist() {\r\n return {\r\n getArtist: id => this.request(`${this.apiURL}/artists/${id}`),\r\n getArtists: ids => this.request(`${this.apiURL}/artists/?ids=${ids}`),\r\n getArtistAlbums: (id, tipo) => {\r\n if (!tipo) return this.request(`${this.apiURL}/artists/${id}/albums`)\r\n return this.request(`${this.apiURL}/artists/${id}/albums?album_type=${tipo}`)\r\n },\r\n getArtistTopTracks: id => this.request(`${this.apiURL}/artists/${id}/top-tracks`),\r\n getArtistRelated: id => this.request(`${this.apiURL}/artists/${id}/related-artists`)\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/artist.js","export const API_URL = 'https://api.spotify.com/v1';\r\nexport default API_URL;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/config.js","export const toJSON = data => data.json();\r\nexport default toJSON;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///spotify-wrapper.umd.min.js","webpack:///webpack/bootstrap c2afcf9e04c547502003","webpack:///./index.js","webpack:///./src/index.js","webpack:///./src/search.js","webpack:///./src/album.js","webpack:///./src/artist.js","webpack:///./src/config.js","webpack:///./src/utils.js"],"names":["root","factory","exports","module","define","amd","self","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","default","_interopRequireDefault","obj","_classCallCheck","instance","Constructor","TypeError","value","_createClass","defineProperties","target","props","length","descriptor","writable","key","protoProps","staticProps","_search","_search2","_album","_album2","_artist","_artist2","_config","_utils","SpotifyWrapper","options","apiURL","API_URL","token","album","bind","search","artist","url","headers","method","Accept","Authorization","fetch","then","toJSON","searchAll","type","query","queryStr","replace","typeConcat","toString","request","searchAlbums","searchArtists","searchPlaylists","searchTracks","_this","getAlbum","id","getAlbums","ids","getTracks","getArtist","getArtists","getArtistAlbums","tipo","getArtistTopTracks","getArtistRelated","data","json"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,eAAAD,IAEAD,EAAA,eAAAC,KACC,mBAAAK,WAAAC,KAAA,WACD,MC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AAU,4BPqPvB7D,GAAQgC,QOpPO6B,GPwPT,SAAU5D,EAAQD,EAASO,GAEjC,YAGAY,QAAOC,eAAepB,EAAS,cAC7BuC,OAAO,GQ/PF,IAAMmC,YAAS,SAAAyB,GAAA,MAAQA,GAAKC,ORoQnCpG,GAAQgC,QQnQO0C","file":"spotify-wrapper.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpotifyWrapper\"] = factory();\n\telse\n\t\troot[\"SpotifyWrapper\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpotifyWrapper\"] = factory();\n\telse\n\t\troot[\"SpotifyWrapper\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1).default;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _search = __webpack_require__(2);\n\nvar _search2 = _interopRequireDefault(_search);\n\nvar _album = __webpack_require__(3);\n\nvar _album2 = _interopRequireDefault(_album);\n\nvar _artist = __webpack_require__(4);\n\nvar _artist2 = _interopRequireDefault(_artist);\n\nvar _config = __webpack_require__(5);\n\nvar _utils = __webpack_require__(6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SpotifyWrapper = function () {\n function SpotifyWrapper(options) {\n _classCallCheck(this, SpotifyWrapper);\n\n this.apiURL = options.apiURL || _config.API_URL;\n this.token = options.token;\n\n this.album = _album2.default.bind(this)();\n this.search = _search2.default.bind(this)();\n this.artist = _artist2.default.bind(this)();\n }\n\n _createClass(SpotifyWrapper, [{\n key: 'request',\n value: function request(url) {\n var headers = {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n Authorization: 'Bearer ' + this.token\n }\n };\n\n return fetch(url, headers).then(_utils.toJSON);\n }\n }]);\n\n return SpotifyWrapper;\n}();\n\nexports.default = SpotifyWrapper;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = search;\nfunction searchAll(type, query) {\n var queryStr = query.replace(/ /g, '+');\n var typeConcat = type.toString();\n return this.request(this.apiURL + '/search?q=' + queryStr + '&type=' + typeConcat);\n}\n\nfunction search() {\n return {\n searchAlbums: searchAll.bind(this, 'album'),\n searchArtists: searchAll.bind(this, 'artist'),\n searchPlaylists: searchAll.bind(this, 'playlist'),\n searchTracks: searchAll.bind(this, 'track')\n };\n}\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = album;\nfunction album() {\n var _this = this;\n\n return {\n getAlbum: function getAlbum(id) {\n return _this.request(_this.apiURL + \"/albums/\" + id);\n },\n getAlbums: function getAlbums(ids) {\n return _this.request(_this.apiURL + \"/albums/?ids=\" + ids);\n },\n getTracks: function getTracks(id) {\n return _this.request(_this.apiURL + \"/albums/\" + id + \"/tracks\");\n }\n };\n}\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = artist;\nfunction artist() {\n var _this = this;\n\n return {\n getArtist: function getArtist(id) {\n return _this.request(_this.apiURL + \"/artists/\" + id);\n },\n getArtists: function getArtists(ids) {\n return _this.request(_this.apiURL + \"/artists/?ids=\" + ids);\n },\n getArtistAlbums: function getArtistAlbums(id, tipo) {\n if (!tipo) return _this.request(_this.apiURL + \"/artists/\" + id + \"/albums\");\n return _this.request(_this.apiURL + \"/artists/\" + id + \"/albums?album_type=\" + tipo);\n },\n getArtistTopTracks: function getArtistTopTracks(id) {\n return _this.request(_this.apiURL + \"/artists/\" + id + \"/top-tracks\");\n },\n getArtistRelated: function getArtistRelated(id) {\n return _this.request(_this.apiURL + \"/artists/\" + id + \"/related-artists\");\n }\n };\n}\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar API_URL = exports.API_URL = 'https://api.spotify.com/v1';\nexports.default = API_URL;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar toJSON = exports.toJSON = function toJSON(data) {\n return data.json();\n};\nexports.default = toJSON;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// spotify-wrapper.umd.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c2afcf9e04c547502003","module.exports = require('./src/index').default;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","import search from './search';\r\nimport album from './album';\r\nimport artist from './artist';\r\n\r\nimport { API_URL } from './config';\r\nimport { toJSON } from './utils';\r\n\r\nexport default class SpotifyWrapper {\r\n constructor(options) {\r\n this.apiURL = options.apiURL || API_URL;\r\n this.token = options.token;\r\n\r\n this.album = album.bind(this)();\r\n this.search = search.bind(this)();\r\n this.artist = artist.bind(this)();\r\n }\r\n\r\n request(url) {\r\n const headers = {\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n Authorization: `Bearer ${this.token}`,\r\n },\r\n };\r\n\r\n return fetch(url, headers).then(toJSON);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","function searchAll(type, query) {\r\n const queryStr = query.replace(/ /g, '+');\r\n const typeConcat = type.toString();\r\n return this.request(`${this.apiURL}/search?q=${queryStr}&type=${typeConcat}`);\r\n}\r\n\r\nexport default function search() {\r\n return {\r\n searchAlbums: searchAll.bind(this, 'album'),\r\n searchArtists: searchAll.bind(this, 'artist'),\r\n searchPlaylists: searchAll.bind(this, 'playlist'),\r\n searchTracks: searchAll.bind(this, 'track'),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/search.js","export default function album() {\r\n return {\r\n getAlbum: id => this.request(`${this.apiURL}/albums/${id}`),\r\n getAlbums: ids => this.request(`${this.apiURL}/albums/?ids=${ids}`),\r\n getTracks: id => this.request(`${this.apiURL}/albums/${id}/tracks`),\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/album.js","export default function artist() {\r\n return {\r\n getArtist: id => this.request(`${this.apiURL}/artists/${id}`),\r\n getArtists: ids => this.request(`${this.apiURL}/artists/?ids=${ids}`),\r\n getArtistAlbums: (id, tipo) => {\r\n if (!tipo) return this.request(`${this.apiURL}/artists/${id}/albums`)\r\n return this.request(`${this.apiURL}/artists/${id}/albums?album_type=${tipo}`)\r\n },\r\n getArtistTopTracks: id => this.request(`${this.apiURL}/artists/${id}/top-tracks`),\r\n getArtistRelated: id => this.request(`${this.apiURL}/artists/${id}/related-artists`)\r\n };\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/artist.js","export const API_URL = 'https://api.spotify.com/v1';\r\nexport default API_URL;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/config.js","export const toJSON = data => data.json();\r\nexport default toJSON;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index f78dcd0..785ef28 100644 --- a/lib/index.js +++ b/lib/index.js @@ -18,9 +18,9 @@ var _artist = require('./artist'); var _artist2 = _interopRequireDefault(_artist); -var _config = require('../src/config'); +var _config = require('./config'); -var _utils = require('../src/utils'); +var _utils = require('./utils'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } diff --git a/package.json b/package.json index 56cfa4b..a5424f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "js-spotify-wrapper", - "version": "1.1.5", + "version": "1.1.7", "description": "Uma aplicação para trabalhar com Spotify Web API.", "main": "lib/index.js", "scripts": { diff --git a/src/index.js b/src/index.js index 62958d5..8a866fd 100644 --- a/src/index.js +++ b/src/index.js @@ -2,8 +2,8 @@ import search from './search'; import album from './album'; import artist from './artist'; -import { API_URL } from '../src/config'; -import { toJSON } from '../src/utils'; +import { API_URL } from './config'; +import { toJSON } from './utils'; export default class SpotifyWrapper { constructor(options) {