@twurple/api
Advanced tools
Comparing version 7.0.0-pre.3 to 7.0.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1067089
28792
0
+ Added@twurple/api-call@7.0.0(transitive)
+ Added@twurple/auth@7.0.0(transitive)
+ Added@twurple/common@7.0.0(transitive)
- Removed@twurple/api-call@7.0.0-pre.3(transitive)
- Removed@twurple/auth@7.0.0-pre.3(transitive)
- Removed@twurple/common@7.0.0-pre.3(transitive)
Updated@twurple/api-call@7.0.0
Updated@twurple/common@7.0.0