apple-music-web-api
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -40,21 +40,10 @@ "use strict"; | ||
var axios_1 = require("axios"); | ||
var fs_1 = require("fs"); | ||
var https_1 = require("https"); | ||
exports.initializeAppleMusicApi = function (developerToken) { | ||
var callApi = function (endpoint) { return __awaiter(void 0, void 0, void 0, function () { | ||
var httpsAgent, response; | ||
var response; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
httpsAgent = new https_1.Agent({ | ||
ca: fs_1.readFileSync("~/Library/Preferences/httptoolkit/ca.pem") | ||
}); | ||
return [4 /*yield*/, axios_1.default.get("https://api.music.apple.com" + endpoint, { | ||
proxy: { | ||
host: "localhost", | ||
port: 8000 | ||
}, | ||
httpsAgent: httpsAgent, | ||
headers: { Authorization: "Bearer " + developerToken } | ||
})]; | ||
case 0: return [4 /*yield*/, axios_1.default.get("https://api.music.apple.com" + endpoint, { | ||
headers: { Authorization: "Bearer " + developerToken } | ||
})]; | ||
case 1: | ||
@@ -61,0 +50,0 @@ response = _a.sent(); |
{ | ||
"name": "apple-music-web-api", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Apple Music API SDK for JS", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
0
41047
139