You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@twurple/api-call

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.0-pre.8 to 5.1.0-pre.9

10

lib/apiCall.js

@@ -26,4 +26,4 @@ "use strict";

const type = (_a = options.type) !== null && _a !== void 0 ? _a : 'helix';
const url = url_1.getTwitchApiUrl(options.url, type);
const params = qs_1.stringify(options.query, { arrayFormat: 'repeat', addQueryPrefix: true });
const url = (0, url_1.getTwitchApiUrl)(options.url, type);
const params = (0, qs_1.stringify)(options.query, { arrayFormat: 'repeat', addQueryPrefix: true });
const headers = new cross_fetch_1.Headers({ Accept: 'application/json' });

@@ -47,3 +47,3 @@ let body = undefined;

};
return await cross_fetch_1.default(`${url}${params}`, requestOptions);
return await (0, cross_fetch_1.default)(`${url}${params}`, requestOptions);
}

@@ -70,8 +70,8 @@ exports.callTwitchApiRaw = callTwitchApiRaw;

const text = isJson ? JSON.stringify(await response.json(), null, 2) : await response.text();
const params = qs_1.stringify(options.query, { arrayFormat: 'repeat', addQueryPrefix: true });
const params = (0, qs_1.stringify)(options.query, { arrayFormat: 'repeat', addQueryPrefix: true });
const fullUrl = `${options.url}${params}`;
throw new HttpStatusCodeError_1.HttpStatusCodeError(response.status, response.statusText, fullUrl, (_a = options.method) !== null && _a !== void 0 ? _a : 'GET', text, isJson);
}
return await transform_1.transformTwitchApiResponse(response);
return await (0, transform_1.transformTwitchApiResponse)(response);
}
exports.callTwitchApi = callTwitchApi;

@@ -11,3 +11,3 @@ "use strict";

constructor(_statusCode, statusText, _url, _method, _body, isJson) {
super(`Encountered HTTP status code ${_statusCode}: ${statusText}\n\nURL: ${_url}\nMethod: ${_method}\nBody:\n${!isJson && _body.length > 150 ? `${_body.substr(0, 147)}...` : _body}`);
super(`Encountered HTTP status code ${_statusCode}: ${statusText}\n\nURL: ${_url}\nMethod: ${_method}\nBody:\n${!isJson && _body.length > 150 ? `${_body.slice(0, 147)}...` : _body}`);
this._statusCode = _statusCode;

@@ -14,0 +14,0 @@ this._url = _url;

{
"name": "@twurple/api-call",
"version": "5.1.0-pre.8",
"version": "5.1.0-pre.9",
"publishConfig": {

@@ -35,3 +35,3 @@ "access": "public"

"@d-fischer/qs": "^7.0.2",
"@twurple/common": "^5.1.0-pre.8",
"@twurple/common": "^5.1.0-pre.9",
"@types/node-fetch": "^2.5.7",

@@ -51,3 +51,3 @@ "tslib": "^2.0.3"

},
"gitHead": "e423c0ac8b72a05cf329970b5c48c5a5ac133039"
"gitHead": "613bcf88d2a743f3e660429befa6381f53bd77fd"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc