@twurple/api-call
Advanced tools
Comparing version 5.1.0-pre.7 to 5.1.0-pre.8
@@ -46,3 +46,3 @@ "use strict"; | ||
}; | ||
return await cross_fetch_1.default(params ? `${url}${params}` : url, requestOptions); | ||
return await cross_fetch_1.default(`${url}${params}`, requestOptions); | ||
} | ||
@@ -69,3 +69,5 @@ exports.callTwitchApiRaw = callTwitchApiRaw; | ||
const text = isJson ? JSON.stringify(await response.json(), null, 2) : await response.text(); | ||
throw new HttpStatusCodeError_1.HttpStatusCodeError(response.status, response.statusText, options.url, (_a = options.method) !== null && _a !== void 0 ? _a : 'GET', text, isJson); | ||
const params = 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); | ||
} | ||
@@ -72,0 +74,0 @@ return await transform_1.transformTwitchApiResponse(response); |
export { callTwitchApi, callTwitchApiRaw } from './apiCall'; | ||
export type { HelixPaginatedResponse, HelixPaginatedResponseWithTotal, HelixResponse } from './HelixResponse'; | ||
export type { TwitchApiCallFetchOptions, TwitchApiCallOptions, TwitchApiCallType } from './TwitchApiCallOptions'; | ||
@@ -3,0 +4,0 @@ export { transformTwitchApiResponse } from './helpers/transform'; |
{ | ||
"name": "@twurple/api-call", | ||
"version": "5.1.0-pre.7", | ||
"version": "5.1.0-pre.8", | ||
"publishConfig": { | ||
@@ -35,3 +35,3 @@ "access": "public" | ||
"@d-fischer/qs": "^7.0.2", | ||
"@twurple/common": "^5.1.0-pre.7", | ||
"@twurple/common": "^5.1.0-pre.8", | ||
"@types/node-fetch": "^2.5.7", | ||
@@ -51,3 +51,3 @@ "tslib": "^2.0.3" | ||
}, | ||
"gitHead": "1c809895331e45aae7c91bb3db4a04737154d832" | ||
"gitHead": "e423c0ac8b72a05cf329970b5c48c5a5ac133039" | ||
} |
Sorry, the diff of this file is not supported yet
19729
24
390
Updated@twurple/common@^5.1.0-pre.8