🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@twurple/api-call

Package Overview
Dependencies
Maintainers
1
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twurple/api-call - npm Package Compare versions

Comparing version
8.0.0
to
8.0.1
+2
-2
lib/apiCall.d.ts

@@ -1,3 +0,3 @@

/// <reference types="node" />
import type { TwitchApiCallFetchOptions, TwitchApiCallOptions } from './TwitchApiCallOptions';
/// <reference types="node" resolution-mode="require"/>
import type { TwitchApiCallFetchOptions, TwitchApiCallOptions } from './TwitchApiCallOptions.js';
/**

@@ -4,0 +4,0 @@ * Makes a call to the Twitch API using the given credentials, returning the raw Response object.

@@ -1,4 +0,4 @@

import { stringify } from 'qs';
import { handleTwitchApiResponseError, transformTwitchApiResponse } from './helpers/transform';
import { getTwitchApiUrl } from './helpers/url';
import { qsStringify } from '@twurple/common';
import { handleTwitchApiResponseError, transformTwitchApiResponse } from './helpers/transform.js';
import { getTwitchApiUrl } from './helpers/url.js';
/**

@@ -20,3 +20,3 @@ * Makes a call to the Twitch API using the given credentials, returning the raw Response object.

const url = getTwitchApiUrl(options.url, type);
const params = stringify(options.query, { arrayFormat: 'repeat', addQueryPrefix: true });
const params = qsStringify(options.query);
// eslint-disable-next-line @typescript-eslint/naming-convention

@@ -23,0 +23,0 @@ const headers = new Headers({ Accept: 'application/json' });

@@ -1,3 +0,3 @@

/// <reference types="node" />
import type { TwitchApiCallOptions } from '../TwitchApiCallOptions';
/// <reference types="node" resolution-mode="require"/>
import type { TwitchApiCallOptions } from '../TwitchApiCallOptions.js';
/** @private */

@@ -4,0 +4,0 @@ export declare function handleTwitchApiResponseError(response: Response, options: TwitchApiCallOptions): Promise<void>;

@@ -1,3 +0,3 @@

import { stringify } from 'qs';
import { HttpStatusCodeError } from '../errors/HttpStatusCodeError';
import { qsStringify } from '@twurple/common';
import { HttpStatusCodeError } from '../errors/HttpStatusCodeError.js';
/** @private */

@@ -8,3 +8,3 @@ export async function handleTwitchApiResponseError(response, options) {

const text = isJson ? JSON.stringify(await response.json(), null, 2) : await response.text();
const params = stringify(options.query, { arrayFormat: 'repeat', addQueryPrefix: true });
const params = qsStringify(options.query);
const fullUrl = `${options.url}${params}`;

@@ -11,0 +11,0 @@ throw new HttpStatusCodeError(response.status, response.statusText, fullUrl, options.method ?? 'GET', text, isJson);

@@ -1,7 +0,7 @@

export { callTwitchApi, callTwitchApiRaw } from './apiCall';
export type { HelixPaginatedResponse, HelixPaginatedResponseWithTotal, HelixResponse } from './HelixResponse';
export type { TwitchApiCallFetchOptions, TwitchApiCallOptions, TwitchApiCallType } from './TwitchApiCallOptions';
export { createBroadcasterQuery } from './helpers/queries.external';
export { handleTwitchApiResponseError, transformTwitchApiResponse } from './helpers/transform';
export { HttpStatusCodeError } from './errors/HttpStatusCodeError';
export { callTwitchApi, callTwitchApiRaw } from './apiCall.js';
export type { HelixPaginatedResponse, HelixPaginatedResponseWithTotal, HelixResponse } from './HelixResponse.js';
export type { TwitchApiCallFetchOptions, TwitchApiCallOptions, TwitchApiCallType } from './TwitchApiCallOptions.js';
export { createBroadcasterQuery } from './helpers/queries.external.js';
export { handleTwitchApiResponseError, transformTwitchApiResponse } from './helpers/transform.js';
export { HttpStatusCodeError } from './errors/HttpStatusCodeError.js';
//# sourceMappingURL=index.d.ts.map

@@ -1,4 +0,4 @@

export { callTwitchApi, callTwitchApiRaw } from './apiCall';
export { createBroadcasterQuery } from './helpers/queries.external';
export { handleTwitchApiResponseError, transformTwitchApiResponse } from './helpers/transform';
export { HttpStatusCodeError } from './errors/HttpStatusCodeError';
export { callTwitchApi, callTwitchApiRaw } from './apiCall.js';
export { createBroadcasterQuery } from './helpers/queries.external.js';
export { handleTwitchApiResponseError, transformTwitchApiResponse } from './helpers/transform.js';
export { HttpStatusCodeError } from './errors/HttpStatusCodeError.js';
{
"name": "@twurple/api-call",
"version": "8.0.0",
"version": "8.0.1",
"publishConfig": {

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

"@d-fischer/shared-utils": "^3.6.1",
"@twurple/common": "8.0.0",
"qs": "^6.14.0",
"@twurple/common": "8.0.1",
"tslib": "^2.0.3"

@@ -39,0 +38,0 @@ },