Socket
Socket
Sign inDemoInstall

@twurple/api

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

@twurple/api - npm Package Compare versions

Comparing version 7.0.0-pre.3 to 7.0.0

4

lib/client/BaseApiClient.js

@@ -111,7 +111,7 @@ "use strict";

if (!contextUserId) {
throw new Error('Tried to make an API call with a scope but no context user ID');
throw new Error('Tried to make an API call with a user context but no context user ID');
}
const accessToken = await authProvider.getAccessTokenForUser(contextUserId, options.scopes);
if (!accessToken) {
throw new Error(`Tried to make an API call with a scope for user ID ${contextUserId} but no token was found`);
throw new Error(`Tried to make an API call with a user context for user ID ${contextUserId} but no token was found`);
}

@@ -118,0 +118,0 @@ if ((0, auth_1.accessTokenIsExpired)(accessToken) && authProvider.refreshAccessTokenForUser) {

@@ -250,5 +250,7 @@ "use strict";

async getStreamKey(broadcaster) {
const userId = (0, common_1.extractUserId)(broadcaster);
const result = await this._client.callApi({
type: 'helix',
url: 'streams/key',
userId,
scopes: ['channel:read:stream_key'],

@@ -255,0 +257,0 @@ query: (0, api_call_1.createBroadcasterQuery)(broadcaster)

@@ -8,2 +8,3 @@ import type { HelixUserType, UserIdResolvable, UserIdResolvableType, UserNameResolveableType } from '@twurple/common';

import type { HelixStream } from '../stream/HelixStream';
import { type HelixSubscription } from '../subscriptions/HelixSubscription';
import { type HelixUserSubscription } from '../subscriptions/HelixUserSubscription';

@@ -124,3 +125,3 @@ /**

*/
getSubscriber(user: UserIdResolvable): Promise<HelixUserSubscription | null>;
getSubscriber(user: UserIdResolvable): Promise<HelixSubscription | null>;
/**

@@ -127,0 +128,0 @@ * Checks whether the given user is subscribed to the broadcaster.

{
"name": "@twurple/api",
"version": "7.0.0-pre.3",
"version": "7.0.0",
"publishConfig": {

@@ -43,4 +43,4 @@ "access": "public"

"@d-fischer/typed-event-emitter": "^3.3.1",
"@twurple/api-call": "7.0.0-pre.3",
"@twurple/common": "7.0.0-pre.3",
"@twurple/api-call": "7.0.0",
"@twurple/common": "7.0.0",
"retry": "^0.13.1",

@@ -50,7 +50,7 @@ "tslib": "^2.0.3"

"devDependencies": {
"@twurple/auth": "7.0.0-pre.3",
"@twurple/auth": "7.0.0",
"@types/retry": "^0.12.2"
},
"peerDependencies": {
"@twurple/auth": "7.0.0-pre.3"
"@twurple/auth": "7.0.0"
},

@@ -57,0 +57,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc