Socket
Socket
Sign inDemoInstall

apple-music-web-api

Package Overview
Dependencies
4
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

19

lib/index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc