Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twurple/api

Package Overview
Dependencies
Maintainers
1
Versions
147
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 5.1.0-pre.1 to 5.1.0-pre.2

es/api/helix/goals/HelixGoal.mjs

21

lib/api/helix/eventSub/HelixEventSubApi.d.ts

@@ -337,2 +337,23 @@ import type { UserIdResolvable } from '@twurple/common';

/**
* Subscribe to events that represent the beginning of a creator goal event in a channel.
*
* @param broadcaster The broadcaster you want to listen to goal begin events for.
* @param transport The transport options.
*/
subscribeToChannelGoalBeginEvents(broadcaster: UserIdResolvable, transport: HelixEventSubTransportOptions): Promise<HelixEventSubSubscription>;
/**
* Subscribe to events that represent progress towards a creator goal.
*
* @param broadcaster The broadcaster for which you want to listen to goal progress events for.
* @param transport The transport options.
*/
subscribeToChannelGoalProgressEvents(broadcaster: UserIdResolvable, transport: HelixEventSubTransportOptions): Promise<HelixEventSubSubscription>;
/**
* Subscribe to events that represent the end of a creator goal event.
*
* @param broadcaster The broadcaster for which you want to listen to goal end events for.
* @param transport The transport options.
*/
subscribeToChannelGoalEndEvents(broadcaster: UserIdResolvable, transport: HelixEventSubTransportOptions): Promise<HelixEventSubSubscription>;
/**
* Subscribe to events that represent the beginning of a Hype Train event in a channel.

@@ -339,0 +360,0 @@ *

@@ -459,2 +459,29 @@ "use strict";

/**
* Subscribe to events that represent the beginning of a creator goal event in a channel.
*
* @param broadcaster The broadcaster you want to listen to goal begin events for.
* @param transport The transport options.
*/
async subscribeToChannelGoalBeginEvents(broadcaster, transport) {
return await this.createSubscription('channel.goal.begin', '1', { broadcaster_user_id: common_1.extractUserId(broadcaster) }, transport);
}
/**
* Subscribe to events that represent progress towards a creator goal.
*
* @param broadcaster The broadcaster for which you want to listen to goal progress events for.
* @param transport The transport options.
*/
async subscribeToChannelGoalProgressEvents(broadcaster, transport) {
return await this.createSubscription('channel.goal.progress', '1', { broadcaster_user_id: common_1.extractUserId(broadcaster) }, transport);
}
/**
* Subscribe to events that represent the end of a creator goal event.
*
* @param broadcaster The broadcaster for which you want to listen to goal end events for.
* @param transport The transport options.
*/
async subscribeToChannelGoalEndEvents(broadcaster, transport) {
return await this.createSubscription('channel.goal.end', '1', { broadcaster_user_id: common_1.extractUserId(broadcaster) }, transport);
}
/**
* Subscribe to events that represent the beginning of a Hype Train event in a channel.

@@ -461,0 +488,0 @@ *

@@ -10,2 +10,3 @@ import { BaseApi } from '../BaseApi';

import { HelixGameApi } from './game/HelixGameApi';
import { HelixGoalApi } from './goals/HelixGoalApi';
import { HelixHypeTrainApi } from './hypeTrain/HelixHypeTrainApi';

@@ -64,2 +65,6 @@ import { HelixModerationApi } from './moderation/HelixModerationApi';

/**
* The Helix goal API methods.
*/
get goals(): HelixGoalApi;
/**
* The Helix Hype Train API methods.

@@ -66,0 +71,0 @@ */

@@ -16,2 +16,3 @@ "use strict";

const HelixGameApi_1 = require("./game/HelixGameApi");
const HelixGoalApi_1 = require("./goals/HelixGoalApi");
const HelixHypeTrainApi_1 = require("./hypeTrain/HelixHypeTrainApi");

@@ -86,2 +87,8 @@ const HelixModerationApi_1 = require("./moderation/HelixModerationApi");

/**
* The Helix goal API methods.
*/
get goals() {
return new HelixGoalApi_1.HelixGoalApi(this._client);
}
/**
* The Helix Hype Train API methods.

@@ -185,2 +192,5 @@ */

cache_decorators_1.CachedGetter()
], HelixApiGroup.prototype, "goals", null);
tslib_1.__decorate([
cache_decorators_1.CachedGetter()
], HelixApiGroup.prototype, "hypeTrain", null);

@@ -187,0 +197,0 @@ tslib_1.__decorate([

2

lib/api/helix/stream/HelixStreamApi.js

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

return new HelixPaginatedRequest_1.HelixPaginatedRequest({
url: 'stream/followed',
url: 'streams/followed',
scope: 'user:read:follows',

@@ -235,0 +235,0 @@ query: {

@@ -97,4 +97,4 @@ import type { UserIdResolvable } from '@twurple/common';

*
* @param user The broadcaster to check the user's subscription for.
* @param broadcaster The user to check.
* @param user The user to check.
* @param broadcaster The broadcaster to check the user's subscription for.
*/

@@ -101,0 +101,0 @@ checkUserSubscription(user: UserIdResolvable, broadcaster: UserIdResolvable): Promise<HelixUserSubscription | null>;

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

*
* @param user The broadcaster to check the user's subscription for.
* @param broadcaster The user to check.
* @param user The user to check.
* @param broadcaster The broadcaster to check the user's subscription for.
*/

@@ -140,0 +140,0 @@ async checkUserSubscription(user, broadcaster) {

@@ -14,2 +14,3 @@ import type { LoggerOptions } from '@d-fischer/logger';

import { HelixGameApi } from './api/helix/game/HelixGameApi';
import { HelixGoalApi } from './api/helix/goals/HelixGoalApi';
import { HelixApiGroup } from './api/helix/HelixApiGroup';

@@ -128,2 +129,6 @@ import { HelixHypeTrainApi } from './api/helix/hypeTrain/HelixHypeTrainApi';

/**
* The Helix goal API methods.
*/
get goals(): HelixGoalApi;
/**
* The Helix moderation API methods.

@@ -182,2 +187,14 @@ */

get unsupported(): UnsupportedApi;
/**
* The last known rate limit for the Helix API.
*/
get lastKnownLimit(): number | null;
/**
* The last known remaining requests for the Helix API.
*/
get lastKnownRemainingRequests(): number | null;
/**
* The last known rate limit reset date for the Helix API.
*/
get lastKnownResetDate(): Date | null;
/** @private */

@@ -184,0 +201,0 @@ get _authProvider(): AuthProvider;

@@ -18,2 +18,3 @@ "use strict";

const HelixGameApi_1 = require("./api/helix/game/HelixGameApi");
const HelixGoalApi_1 = require("./api/helix/goals/HelixGoalApi");
const HelixApiGroup_1 = require("./api/helix/HelixApiGroup");

@@ -170,2 +171,8 @@ const HelixRateLimiter_1 = require("./api/helix/HelixRateLimiter");

/**
* The Helix goal API methods.
*/
get goals() {
return new HelixGoalApi_1.HelixGoalApi(this);
}
/**
* The Helix moderation API methods.

@@ -250,2 +257,20 @@ */

}
/**
* The last known rate limit for the Helix API.
*/
get lastKnownLimit() {
return this._helixRateLimiter.lastKnownLimit;
}
/**
* The last known remaining requests for the Helix API.
*/
get lastKnownRemainingRequests() {
return this._helixRateLimiter.lastKnownRemainingRequests;
}
/**
* The last known rate limit reset date for the Helix API.
*/
get lastKnownResetDate() {
return this._helixRateLimiter.lastKnownResetDate;
}
/** @private */

@@ -295,2 +320,5 @@ get _authProvider() {

cache_decorators_1.CachedGetter()
], ApiClient.prototype, "goals", null);
tslib_1.__decorate([
cache_decorators_1.CachedGetter()
], ApiClient.prototype, "moderation", null);

@@ -297,0 +325,0 @@ tslib_1.__decorate([

@@ -57,2 +57,5 @@ export { ApiClient } from './ApiClient';

export { HelixGame } from './api/helix/game/HelixGame';
export { HelixGoalApi } from './api/helix/goals/HelixGoalApi';
export { HelixGoal } from './api/helix/goals/HelixGoal';
export type { HelixGoalData, HelixGoalType } from './api/helix/goals/HelixGoal';
export { HelixHypeTrainApi } from './api/helix/hypeTrain/HelixHypeTrainApi';

@@ -59,0 +62,0 @@ export { HelixHypeTrainContribution } from './api/helix/hypeTrain/HelixHypeTrainContribution';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HelixPredictor = exports.HelixPredictionOutcome = exports.HelixPrediction = exports.HelixPredictionApi = exports.HelixPollChoice = exports.HelixPoll = exports.HelixPollApi = exports.HelixModeratorEvent = exports.HelixModerator = exports.HelixBanEvent = exports.HelixBan = exports.HelixModerationApi = exports.HelixHypeTrainEvent = exports.HelixHypeTrainContribution = exports.HelixHypeTrainApi = exports.HelixGame = exports.HelixGameApi = exports.HelixExtensionTransaction = exports.HelixExtensionBitsProduct = exports.HelixExtension = exports.HelixExtensionsApi = exports.HelixEventSubSubscription = exports.HelixEventSubApi = exports.HelixClip = exports.HelixClipApi = exports.HelixEmoteFromSet = exports.HelixChannelEmote = exports.HelixEmote = exports.HelixChatBadgeVersion = exports.HelixChatBadgeSet = exports.HelixChatApi = exports.HelixCustomRewardRedemption = exports.HelixCustomReward = exports.HelixChannelPointsApi = exports.HelixChannelReference = exports.HelixChannelEditor = exports.HelixChannel = exports.HelixChannelApi = exports.HelixCheermoteList = exports.HelixBitsLeaderboardEntry = exports.HelixBitsLeaderboard = exports.HelixBitsApi = exports.HelixPaginatedRequestWithTotal = exports.HelixPaginatedRequest = exports.HelixApiGroup = exports.ChatBadgeVersion = exports.ChatBadgeSet = exports.ChatBadgeList = exports.BadgesApi = exports.ApiClient = void 0;
exports.HellFreezesOverError = exports.extractUserName = exports.extractUserId = exports.ChatEmote = exports.StreamNotLiveError = exports.NoSubscriptionProgramError = exports.ConfigError = exports.ChattersList = exports.UnsupportedApi = exports.HelixVideo = exports.HelixVideoApi = exports.HelixUserExtension = exports.HelixInstalledExtensionList = exports.HelixInstalledExtension = exports.HelixBaseExtension = exports.HelixUser = exports.HelixPrivilegedUser = exports.HelixFollow = exports.HelixUserBlock = exports.HelixUserApi = exports.HelixTeamWithUsers = exports.HelixTeam = exports.HelixTeamApi = exports.HelixTag = exports.HelixTagApi = exports.HelixSubscriptionEvent = exports.HelixSubscription = exports.HelixSubscriptionApi = exports.HelixStreamMarkerWithVideo = exports.HelixStreamMarker = exports.HelixStream = exports.HelixStreamApi = exports.HelixChannelSearchResult = exports.HelixSearchApi = exports.HelixPaginatedScheduleSegmentRequest = exports.HelixScheduleSegment = exports.HelixSchedule = exports.HelixScheduleApi = exports.HelixUserRelation = void 0;
exports.HelixPrediction = exports.HelixPredictionApi = exports.HelixPollChoice = exports.HelixPoll = exports.HelixPollApi = exports.HelixModeratorEvent = exports.HelixModerator = exports.HelixBanEvent = exports.HelixBan = exports.HelixModerationApi = exports.HelixHypeTrainEvent = exports.HelixHypeTrainContribution = exports.HelixHypeTrainApi = exports.HelixGoal = exports.HelixGoalApi = exports.HelixGame = exports.HelixGameApi = exports.HelixExtensionTransaction = exports.HelixExtensionBitsProduct = exports.HelixExtension = exports.HelixExtensionsApi = exports.HelixEventSubSubscription = exports.HelixEventSubApi = exports.HelixClip = exports.HelixClipApi = exports.HelixEmoteFromSet = exports.HelixChannelEmote = exports.HelixEmote = exports.HelixChatBadgeVersion = exports.HelixChatBadgeSet = exports.HelixChatApi = exports.HelixCustomRewardRedemption = exports.HelixCustomReward = exports.HelixChannelPointsApi = exports.HelixChannelReference = exports.HelixChannelEditor = exports.HelixChannel = exports.HelixChannelApi = exports.HelixCheermoteList = exports.HelixBitsLeaderboardEntry = exports.HelixBitsLeaderboard = exports.HelixBitsApi = exports.HelixPaginatedRequestWithTotal = exports.HelixPaginatedRequest = exports.HelixApiGroup = exports.ChatBadgeVersion = exports.ChatBadgeSet = exports.ChatBadgeList = exports.BadgesApi = exports.ApiClient = void 0;
exports.HellFreezesOverError = exports.extractUserName = exports.extractUserId = exports.ChatEmote = exports.StreamNotLiveError = exports.NoSubscriptionProgramError = exports.ConfigError = exports.ChattersList = exports.UnsupportedApi = exports.HelixVideo = exports.HelixVideoApi = exports.HelixUserExtension = exports.HelixInstalledExtensionList = exports.HelixInstalledExtension = exports.HelixBaseExtension = exports.HelixUser = exports.HelixPrivilegedUser = exports.HelixFollow = exports.HelixUserBlock = exports.HelixUserApi = exports.HelixTeamWithUsers = exports.HelixTeam = exports.HelixTeamApi = exports.HelixTag = exports.HelixTagApi = exports.HelixSubscriptionEvent = exports.HelixSubscription = exports.HelixSubscriptionApi = exports.HelixStreamMarkerWithVideo = exports.HelixStreamMarker = exports.HelixStream = exports.HelixStreamApi = exports.HelixChannelSearchResult = exports.HelixSearchApi = exports.HelixPaginatedScheduleSegmentRequest = exports.HelixScheduleSegment = exports.HelixSchedule = exports.HelixScheduleApi = exports.HelixUserRelation = exports.HelixPredictor = exports.HelixPredictionOutcome = void 0;
var ApiClient_1 = require("./ApiClient");

@@ -75,2 +75,6 @@ Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function () { return ApiClient_1.ApiClient; } });

Object.defineProperty(exports, "HelixGame", { enumerable: true, get: function () { return HelixGame_1.HelixGame; } });
var HelixGoalApi_1 = require("./api/helix/goals/HelixGoalApi");
Object.defineProperty(exports, "HelixGoalApi", { enumerable: true, get: function () { return HelixGoalApi_1.HelixGoalApi; } });
var HelixGoal_1 = require("./api/helix/goals/HelixGoal");
Object.defineProperty(exports, "HelixGoal", { enumerable: true, get: function () { return HelixGoal_1.HelixGoal; } });
var HelixHypeTrainApi_1 = require("./api/helix/hypeTrain/HelixHypeTrainApi");

@@ -77,0 +81,0 @@ Object.defineProperty(exports, "HelixHypeTrainApi", { enumerable: true, get: function () { return HelixHypeTrainApi_1.HelixHypeTrainApi; } });

{
"name": "@twurple/api",
"version": "5.1.0-pre.1",
"version": "5.1.0-pre.2",
"publishConfig": {

@@ -37,10 +37,10 @@ "access": "public"

"@d-fischer/logger": "^4.0.0",
"@d-fischer/rate-limiter": "^0.4.4",
"@d-fischer/rate-limiter": "^0.5.0",
"@d-fischer/shared-utils": "^3.2.0",
"@twurple/api-call": "^5.1.0-pre.1",
"@twurple/common": "^5.1.0-pre.1",
"@twurple/api-call": "^5.1.0-pre.2",
"@twurple/common": "^5.1.0-pre.2",
"tslib": "^2.0.3"
},
"devDependencies": {
"@twurple/auth": "^5.1.0-pre.1"
"@twurple/auth": "^5.1.0-pre.2"
},

@@ -61,3 +61,3 @@ "peerDependencies": {

},
"gitHead": "b58a7d10c004a9e7a62952481db32a500d386a03"
"gitHead": "0da9ad79c50cc52181e03346460bd3a4bcc05a7b"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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