@yuniruyuni/n8n-nodes-twitch 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nodes/{TwitchBans/TwitchBans.node.d.ts → Twitch/Twitch.node.d.ts} +1 -1
- package/dist/nodes/Twitch/Twitch.node.js +147 -0
- package/dist/nodes/Twitch/Twitch.node.js.map +1 -0
- package/dist/nodes/Twitch/resources/Announcement.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Announcement.js +116 -0
- package/dist/nodes/Twitch/resources/Announcement.js.map +1 -0
- package/dist/nodes/Twitch/resources/Ban.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Ban.js +202 -0
- package/dist/nodes/Twitch/resources/Ban.js.map +1 -0
- package/dist/nodes/Twitch/resources/BitsLeaderboard.d.ts +3 -0
- package/dist/nodes/Twitch/resources/BitsLeaderboard.js +138 -0
- package/dist/nodes/Twitch/resources/BitsLeaderboard.js.map +1 -0
- package/dist/nodes/Twitch/resources/Channel.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Channel.js +62 -0
- package/dist/nodes/Twitch/resources/Channel.js.map +1 -0
- package/dist/nodes/Twitch/resources/ChatMessage.d.ts +3 -0
- package/dist/nodes/Twitch/resources/ChatMessage.js +95 -0
- package/dist/nodes/Twitch/resources/ChatMessage.js.map +1 -0
- package/dist/nodes/Twitch/resources/Chatter.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Chatter.js +61 -0
- package/dist/nodes/Twitch/resources/Chatter.js.map +1 -0
- package/dist/nodes/Twitch/resources/Cheermote.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Cheermote.js +58 -0
- package/dist/nodes/Twitch/resources/Cheermote.js.map +1 -0
- package/dist/nodes/Twitch/resources/Clip.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Clip.js +224 -0
- package/dist/nodes/Twitch/resources/Clip.js.map +1 -0
- package/dist/nodes/Twitch/resources/CommonFields.d.ts +2 -0
- package/dist/nodes/Twitch/resources/CommonFields.js +241 -0
- package/dist/nodes/Twitch/resources/CommonFields.js.map +1 -0
- package/dist/nodes/Twitch/resources/CustomReward.d.ts +3 -0
- package/dist/nodes/Twitch/resources/CustomReward.js +550 -0
- package/dist/nodes/Twitch/resources/CustomReward.js.map +1 -0
- package/dist/nodes/Twitch/resources/Emote.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Emote.js +56 -0
- package/dist/nodes/Twitch/resources/Emote.js.map +1 -0
- package/dist/nodes/Twitch/resources/Game.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Game.js +191 -0
- package/dist/nodes/Twitch/resources/Game.js.map +1 -0
- package/dist/nodes/Twitch/resources/Moderator.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Moderator.js +175 -0
- package/dist/nodes/Twitch/resources/Moderator.js.map +1 -0
- package/dist/nodes/Twitch/resources/Poll.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Poll.js +349 -0
- package/dist/nodes/Twitch/resources/Poll.js.map +1 -0
- package/dist/nodes/Twitch/resources/Prediction.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Prediction.js +305 -0
- package/dist/nodes/Twitch/resources/Prediction.js.map +1 -0
- package/dist/nodes/Twitch/resources/Raid.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Raid.js +146 -0
- package/dist/nodes/Twitch/resources/Raid.js.map +1 -0
- package/dist/nodes/Twitch/resources/Redemption.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Redemption.js +235 -0
- package/dist/nodes/Twitch/resources/Redemption.js.map +1 -0
- package/dist/nodes/Twitch/resources/Schedule.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Schedule.js +388 -0
- package/dist/nodes/Twitch/resources/Schedule.js.map +1 -0
- package/dist/nodes/Twitch/resources/Search.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Search.js +97 -0
- package/dist/nodes/Twitch/resources/Search.js.map +1 -0
- package/dist/nodes/Twitch/resources/Stream.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Stream.js +68 -0
- package/dist/nodes/Twitch/resources/Stream.js.map +1 -0
- package/dist/nodes/Twitch/resources/Subscription.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Subscription.js +144 -0
- package/dist/nodes/Twitch/resources/Subscription.js.map +1 -0
- package/dist/nodes/Twitch/resources/Team.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Team.js +153 -0
- package/dist/nodes/Twitch/resources/Team.js.map +1 -0
- package/dist/nodes/Twitch/resources/User.d.ts +3 -0
- package/dist/nodes/Twitch/resources/User.js +68 -0
- package/dist/nodes/Twitch/resources/User.js.map +1 -0
- package/dist/nodes/Twitch/resources/Video.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Video.js +296 -0
- package/dist/nodes/Twitch/resources/Video.js.map +1 -0
- package/dist/nodes/Twitch/resources/Whisper.d.ts +3 -0
- package/dist/nodes/Twitch/resources/Whisper.js +78 -0
- package/dist/nodes/Twitch/resources/Whisper.js.map +1 -0
- package/dist/nodes/Twitch/shared/userIdConverter.js.map +1 -0
- package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js +1 -1
- package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js.map +1 -1
- package/dist/package.json +3 -26
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -26
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.d.ts +0 -4
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js +0 -169
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js.map +0 -1
- package/dist/nodes/TwitchBans/TwitchBans.node.js +0 -340
- package/dist/nodes/TwitchBans/TwitchBans.node.js.map +0 -1
- package/dist/nodes/TwitchBans/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchBans/twitch.svg +0 -1
- package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.d.ts +0 -4
- package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.js +0 -174
- package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.js.map +0 -1
- package/dist/nodes/TwitchBitsLeaderboard/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchBitsLeaderboard/twitch.svg +0 -1
- package/dist/nodes/TwitchChannels/TwitchChannels.node.d.ts +0 -4
- package/dist/nodes/TwitchChannels/TwitchChannels.node.js +0 -104
- package/dist/nodes/TwitchChannels/TwitchChannels.node.js.map +0 -1
- package/dist/nodes/TwitchChannels/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchChannels/twitch.svg +0 -1
- package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.d.ts +0 -4
- package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.js +0 -133
- package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.js.map +0 -1
- package/dist/nodes/TwitchChatMessages/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchChatMessages/twitch.svg +0 -1
- package/dist/nodes/TwitchChatters/TwitchChatters.node.d.ts +0 -4
- package/dist/nodes/TwitchChatters/TwitchChatters.node.js +0 -133
- package/dist/nodes/TwitchChatters/TwitchChatters.node.js.map +0 -1
- package/dist/nodes/TwitchChatters/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchChatters/twitch.svg +0 -1
- package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.d.ts +0 -4
- package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.js +0 -99
- package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.js.map +0 -1
- package/dist/nodes/TwitchCheermotes/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchCheermotes/twitch.svg +0 -1
- package/dist/nodes/TwitchClips/TwitchClips.node.d.ts +0 -4
- package/dist/nodes/TwitchClips/TwitchClips.node.js +0 -291
- package/dist/nodes/TwitchClips/TwitchClips.node.js.map +0 -1
- package/dist/nodes/TwitchClips/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchClips/twitch.svg +0 -1
- package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.d.ts +0 -4
- package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.js +0 -581
- package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.js.map +0 -1
- package/dist/nodes/TwitchCustomRewards/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchCustomRewards/twitch.svg +0 -1
- package/dist/nodes/TwitchEmotes/TwitchEmotes.node.d.ts +0 -4
- package/dist/nodes/TwitchEmotes/TwitchEmotes.node.js +0 -97
- package/dist/nodes/TwitchEmotes/TwitchEmotes.node.js.map +0 -1
- package/dist/nodes/TwitchEmotes/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchEmotes/twitch.svg +0 -1
- package/dist/nodes/TwitchGames/TwitchGames.node.d.ts +0 -4
- package/dist/nodes/TwitchGames/TwitchGames.node.js +0 -230
- package/dist/nodes/TwitchGames/TwitchGames.node.js.map +0 -1
- package/dist/nodes/TwitchGames/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchGames/twitch.svg +0 -1
- package/dist/nodes/TwitchModerators/TwitchModerators.node.d.ts +0 -4
- package/dist/nodes/TwitchModerators/TwitchModerators.node.js +0 -287
- package/dist/nodes/TwitchModerators/TwitchModerators.node.js.map +0 -1
- package/dist/nodes/TwitchModerators/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchModerators/twitch.svg +0 -1
- package/dist/nodes/TwitchPolls/TwitchPolls.node.d.ts +0 -4
- package/dist/nodes/TwitchPolls/TwitchPolls.node.js +0 -426
- package/dist/nodes/TwitchPolls/TwitchPolls.node.js.map +0 -1
- package/dist/nodes/TwitchPolls/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchPolls/twitch.svg +0 -1
- package/dist/nodes/TwitchPredictions/TwitchPredictions.node.d.ts +0 -4
- package/dist/nodes/TwitchPredictions/TwitchPredictions.node.js +0 -382
- package/dist/nodes/TwitchPredictions/TwitchPredictions.node.js.map +0 -1
- package/dist/nodes/TwitchPredictions/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchPredictions/twitch.svg +0 -1
- package/dist/nodes/TwitchRaids/TwitchRaids.node.d.ts +0 -4
- package/dist/nodes/TwitchRaids/TwitchRaids.node.js +0 -183
- package/dist/nodes/TwitchRaids/TwitchRaids.node.js.map +0 -1
- package/dist/nodes/TwitchRaids/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchRaids/twitch.svg +0 -1
- package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.d.ts +0 -4
- package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.js +0 -274
- package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.js.map +0 -1
- package/dist/nodes/TwitchRedemptions/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchRedemptions/twitch.svg +0 -1
- package/dist/nodes/TwitchSchedule/TwitchSchedule.node.d.ts +0 -4
- package/dist/nodes/TwitchSchedule/TwitchSchedule.node.js +0 -432
- package/dist/nodes/TwitchSchedule/TwitchSchedule.node.js.map +0 -1
- package/dist/nodes/TwitchSchedule/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchSchedule/twitch.svg +0 -1
- package/dist/nodes/TwitchSearch/TwitchSearch.node.d.ts +0 -4
- package/dist/nodes/TwitchSearch/TwitchSearch.node.js +0 -134
- package/dist/nodes/TwitchSearch/TwitchSearch.node.js.map +0 -1
- package/dist/nodes/TwitchSearch/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchSearch/twitch.svg +0 -1
- package/dist/nodes/TwitchStreams/TwitchStreams.node.d.ts +0 -4
- package/dist/nodes/TwitchStreams/TwitchStreams.node.js +0 -94
- package/dist/nodes/TwitchStreams/TwitchStreams.node.js.map +0 -1
- package/dist/nodes/TwitchStreams/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchStreams/twitch.svg +0 -1
- package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.d.ts +0 -4
- package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.js +0 -208
- package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.js.map +0 -1
- package/dist/nodes/TwitchSubscriptions/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchSubscriptions/twitch.svg +0 -1
- package/dist/nodes/TwitchTeams/TwitchTeams.node.d.ts +0 -4
- package/dist/nodes/TwitchTeams/TwitchTeams.node.js +0 -191
- package/dist/nodes/TwitchTeams/TwitchTeams.node.js.map +0 -1
- package/dist/nodes/TwitchTeams/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchTeams/twitch.svg +0 -1
- package/dist/nodes/TwitchUsers/TwitchUsers.node.d.ts +0 -4
- package/dist/nodes/TwitchUsers/TwitchUsers.node.js +0 -94
- package/dist/nodes/TwitchUsers/TwitchUsers.node.js.map +0 -1
- package/dist/nodes/TwitchUsers/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchUsers/twitch.svg +0 -1
- package/dist/nodes/TwitchVideos/TwitchVideos.node.d.ts +0 -4
- package/dist/nodes/TwitchVideos/TwitchVideos.node.js +0 -343
- package/dist/nodes/TwitchVideos/TwitchVideos.node.js.map +0 -1
- package/dist/nodes/TwitchVideos/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchVideos/twitch.svg +0 -1
- package/dist/nodes/TwitchWhispers/TwitchWhispers.node.d.ts +0 -4
- package/dist/nodes/TwitchWhispers/TwitchWhispers.node.js +0 -105
- package/dist/nodes/TwitchWhispers/TwitchWhispers.node.js.map +0 -1
- package/dist/nodes/TwitchWhispers/twitch.dark.svg +0 -1
- package/dist/nodes/TwitchWhispers/twitch.svg +0 -1
- package/dist/nodes/shared/userIdConverter.js.map +0 -1
- /package/dist/nodes/{shared → Twitch/shared}/userIdConverter.d.ts +0 -0
- /package/dist/nodes/{shared → Twitch/shared}/userIdConverter.js +0 -0
- /package/dist/nodes/{TwitchAnnouncements → Twitch}/twitch.dark.svg +0 -0
- /package/dist/nodes/{TwitchAnnouncements → Twitch}/twitch.svg +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subscriptionFields = exports.subscriptionOperations = void 0;
|
|
4
|
+
const userIdConverter_1 = require("../shared/userIdConverter");
|
|
5
|
+
exports.subscriptionOperations = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['subscription'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Get Broadcaster Subscriptions',
|
|
19
|
+
value: 'getBroadcasterSubscriptions',
|
|
20
|
+
action: 'Get broadcaster subscriptions',
|
|
21
|
+
description: 'Get a list of broadcaster subscriptions',
|
|
22
|
+
routing: {
|
|
23
|
+
request: {
|
|
24
|
+
method: 'GET',
|
|
25
|
+
url: '/subscriptions',
|
|
26
|
+
},
|
|
27
|
+
send: {
|
|
28
|
+
preSend: [
|
|
29
|
+
async function (requestOptions) {
|
|
30
|
+
const broadcasterIdInput = this.getNodeParameter('broadcasterId', 0);
|
|
31
|
+
const userIdInput = this.getNodeParameter('userId', 0);
|
|
32
|
+
const first = this.getNodeParameter('first', 0);
|
|
33
|
+
const after = this.getNodeParameter('after', 0);
|
|
34
|
+
const broadcasterId = await userIdConverter_1.resolveUserIdOrUsername.call(this, broadcasterIdInput);
|
|
35
|
+
const qs = {
|
|
36
|
+
broadcaster_id: broadcasterId,
|
|
37
|
+
};
|
|
38
|
+
if (userIdInput) {
|
|
39
|
+
const userIds = userIdInput.split(',').map((id) => id.trim()).filter((id) => id);
|
|
40
|
+
if (userIds.length > 0) {
|
|
41
|
+
const resolvedUserIds = await Promise.all(userIds.map((id) => userIdConverter_1.resolveUserIdOrUsername.call(this, id)));
|
|
42
|
+
qs.user_id = resolvedUserIds;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (first)
|
|
46
|
+
qs.first = first;
|
|
47
|
+
if (after)
|
|
48
|
+
qs.after = after;
|
|
49
|
+
requestOptions.qs = qs;
|
|
50
|
+
return requestOptions;
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
output: {
|
|
55
|
+
postReceive: [
|
|
56
|
+
{
|
|
57
|
+
type: 'rootProperty',
|
|
58
|
+
properties: {
|
|
59
|
+
property: 'data',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Check User Subscription',
|
|
68
|
+
value: 'checkUserSubscription',
|
|
69
|
+
action: 'Check user subscription',
|
|
70
|
+
description: 'Check if a user is subscribed to a broadcaster',
|
|
71
|
+
routing: {
|
|
72
|
+
request: {
|
|
73
|
+
method: 'GET',
|
|
74
|
+
url: '/subscriptions/user',
|
|
75
|
+
},
|
|
76
|
+
send: {
|
|
77
|
+
preSend: [
|
|
78
|
+
async function (requestOptions) {
|
|
79
|
+
const broadcasterIdInput = this.getNodeParameter('broadcasterId', 0);
|
|
80
|
+
const userIdInput = this.getNodeParameter('checkUserId', 0);
|
|
81
|
+
const broadcasterId = await userIdConverter_1.resolveUserIdOrUsername.call(this, broadcasterIdInput);
|
|
82
|
+
const userId = await userIdConverter_1.resolveUserIdOrUsername.call(this, userIdInput);
|
|
83
|
+
requestOptions.qs = {
|
|
84
|
+
broadcaster_id: broadcasterId,
|
|
85
|
+
user_id: userId,
|
|
86
|
+
};
|
|
87
|
+
return requestOptions;
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
output: {
|
|
92
|
+
postReceive: [
|
|
93
|
+
{
|
|
94
|
+
type: 'rootProperty',
|
|
95
|
+
properties: {
|
|
96
|
+
property: 'data',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'setKeyValue',
|
|
101
|
+
properties: {
|
|
102
|
+
index: 0,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
default: 'getBroadcasterSubscriptions',
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
exports.subscriptionFields = [
|
|
114
|
+
{
|
|
115
|
+
displayName: 'User ID or Username',
|
|
116
|
+
name: 'checkUserId',
|
|
117
|
+
type: 'string',
|
|
118
|
+
required: true,
|
|
119
|
+
default: '',
|
|
120
|
+
placeholder: 'e.g. 123456789 or username',
|
|
121
|
+
description: 'The user ID or username to check. If a username is provided, it will be automatically converted to user ID.',
|
|
122
|
+
displayOptions: {
|
|
123
|
+
show: {
|
|
124
|
+
resource: ['subscription'],
|
|
125
|
+
operation: ['checkUserSubscription'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
displayName: 'After',
|
|
131
|
+
name: 'after',
|
|
132
|
+
type: 'string',
|
|
133
|
+
default: '',
|
|
134
|
+
placeholder: 'e.g. eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MjB9fQ',
|
|
135
|
+
description: 'Pagination cursor',
|
|
136
|
+
displayOptions: {
|
|
137
|
+
show: {
|
|
138
|
+
resource: ['subscription'],
|
|
139
|
+
operation: ['getBroadcasterSubscriptions'],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
//# sourceMappingURL=Subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/Subscription.ts"],"names":[],"mappings":";;;AACA,+DAAoE;AAEvD,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;Q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AAE,aAAa;oCAC7B,OAAO,EAAE,MAAM;iCACf,CAAC;gCAEF,OAAO,cAAc,CAAC;4BACvB,CAAC;yBACD;qBACD;oBACD,MAAM,EAAE;wBACP,WAAW,EAAE;4BACZ;gCACC,IAAI,EAAE,cAAc;gCACpB,UAAU,EAAE;oCACX,QAAQ,EAAE,MAAM;iCAChB;6BACD;4BACD;gCACC,IAAI,EAAE,aAAa;gCACnB,UAAU,EAAE;oCACX,KAAK,EAAE,CAAC;iCACR;6BACD;yBACD;qBACD;iBACD;aACD;SACD;QACD,OAAO,EAAE,6BAA6B;KACtC;CACD,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IAIpD;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;QACzC,WAAW,EAAE,6GAA6G;QAC1H,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACpC;SACD;KACD;IAGD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6CAA6C;QAC1D,WAAW,EAAE,mBAAmB;QAChC,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,6BAA6B,CAAC;aAC1C;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.teamFields = exports.teamOperations = void 0;
|
|
4
|
+
const userIdConverter_1 = require("../shared/userIdConverter");
|
|
5
|
+
exports.teamOperations = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['team'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Get Channel Teams',
|
|
19
|
+
value: 'getChannelTeams',
|
|
20
|
+
action: 'Get channel teams',
|
|
21
|
+
description: 'Get all teams that a broadcaster is a member of',
|
|
22
|
+
routing: {
|
|
23
|
+
request: {
|
|
24
|
+
method: 'GET',
|
|
25
|
+
url: '/teams/channel',
|
|
26
|
+
},
|
|
27
|
+
send: {
|
|
28
|
+
preSend: [
|
|
29
|
+
async function (requestOptions) {
|
|
30
|
+
const broadcasterIdInput = this.getNodeParameter('broadcasterId', 0);
|
|
31
|
+
const broadcasterId = await userIdConverter_1.resolveUserIdOrUsername.call(this, broadcasterIdInput);
|
|
32
|
+
requestOptions.qs = {
|
|
33
|
+
broadcaster_id: broadcasterId,
|
|
34
|
+
};
|
|
35
|
+
return requestOptions;
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
output: {
|
|
40
|
+
postReceive: [
|
|
41
|
+
{
|
|
42
|
+
type: 'rootProperty',
|
|
43
|
+
properties: {
|
|
44
|
+
property: 'data',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Get Team',
|
|
53
|
+
value: 'getTeam',
|
|
54
|
+
action: 'Get team',
|
|
55
|
+
description: 'Get information about a specific team',
|
|
56
|
+
routing: {
|
|
57
|
+
request: {
|
|
58
|
+
method: 'GET',
|
|
59
|
+
url: '/teams',
|
|
60
|
+
},
|
|
61
|
+
send: {
|
|
62
|
+
preSend: [
|
|
63
|
+
async function (requestOptions) {
|
|
64
|
+
const searchBy = this.getNodeParameter('searchBy', 0);
|
|
65
|
+
const searchValue = this.getNodeParameter(searchBy, 0);
|
|
66
|
+
requestOptions.qs = {
|
|
67
|
+
[searchBy]: searchValue,
|
|
68
|
+
};
|
|
69
|
+
return requestOptions;
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
output: {
|
|
74
|
+
postReceive: [
|
|
75
|
+
{
|
|
76
|
+
type: 'rootProperty',
|
|
77
|
+
properties: {
|
|
78
|
+
property: 'data',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'setKeyValue',
|
|
83
|
+
properties: {
|
|
84
|
+
index: 0,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
default: 'getChannelTeams',
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
exports.teamFields = [
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Search By',
|
|
98
|
+
name: 'searchBy',
|
|
99
|
+
type: 'options',
|
|
100
|
+
required: true,
|
|
101
|
+
options: [
|
|
102
|
+
{
|
|
103
|
+
name: 'Name',
|
|
104
|
+
value: 'name',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'ID',
|
|
108
|
+
value: 'id',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
default: 'name',
|
|
112
|
+
description: 'Search team by name or ID',
|
|
113
|
+
displayOptions: {
|
|
114
|
+
show: {
|
|
115
|
+
resource: ['team'],
|
|
116
|
+
operation: ['getTeam'],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Team Name',
|
|
122
|
+
name: 'name',
|
|
123
|
+
type: 'string',
|
|
124
|
+
required: true,
|
|
125
|
+
default: '',
|
|
126
|
+
placeholder: 'e.g. staff',
|
|
127
|
+
description: 'The name of the team',
|
|
128
|
+
displayOptions: {
|
|
129
|
+
show: {
|
|
130
|
+
resource: ['team'],
|
|
131
|
+
operation: ['getTeam'],
|
|
132
|
+
searchBy: ['name'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Team ID',
|
|
138
|
+
name: 'id',
|
|
139
|
+
type: 'string',
|
|
140
|
+
required: true,
|
|
141
|
+
default: '',
|
|
142
|
+
placeholder: 'e.g. 123456',
|
|
143
|
+
description: 'The ID of the team',
|
|
144
|
+
displayOptions: {
|
|
145
|
+
show: {
|
|
146
|
+
resource: ['team'],
|
|
147
|
+
operation: ['getTeam'],
|
|
148
|
+
searchBy: ['id'],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
];
|
|
153
|
+
//# sourceMappingURL=Team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Team.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/Team.ts"],"names":[],"mappings":";;;AACA,+DAAoE;AAEvD,QAAA,cAAc,GAAsB;IAChD;QACG,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACxB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;QACC,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,iBAAiB;gBACxB,MAAM,EAAE,mBAAmB;gBAC3B,WAAW,EAAE,iDAAiD;gBAC9D,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,gBAAgB;qBACrB;oBACD,IAAI,EAAE;wBACL,OAAO,EAAE;4BACR,KAAK,WAAiB,cAAc;gCACnC,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAA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GAAsB;IAG1C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aACb;YACD;gBACC,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI;aACX;SACD;QACD,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,2BAA2B;QACxC,cAAc,EAAE;YACf,IAAI,EAAE;gBACP,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAChB,SAAS,EAAE,CAAC,SAAS,CAAC;aACtB;SACD;KACD;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,sBAAsB;QACnC,cAAc,EAAE;YACf,IAAI,EAAE;gBACP,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAChB,SAAS,EAAE,CAAC,SAAS,CAAC;gBACtB,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;KACD;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,oBAAoB;QACjC,cAAc,EAAE;YACf,IAAI,EAAE;gBACP,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAChB,SAAS,EAAE,CAAC,SAAS,CAAC;gBACtB,QAAQ,EAAE,CAAC,IAAI,CAAC;aAChB;SACD;KACD;CACH,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userFields = exports.userOperations = void 0;
|
|
4
|
+
exports.userOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['user'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get',
|
|
18
|
+
value: 'get',
|
|
19
|
+
action: 'Get a user',
|
|
20
|
+
description: 'Get information about a user',
|
|
21
|
+
routing: {
|
|
22
|
+
request: {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
url: '/users',
|
|
25
|
+
qs: {
|
|
26
|
+
login: '={{$parameter.userLogin}}',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
output: {
|
|
30
|
+
postReceive: [
|
|
31
|
+
{
|
|
32
|
+
type: 'rootProperty',
|
|
33
|
+
properties: {
|
|
34
|
+
property: 'data',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'setKeyValue',
|
|
39
|
+
properties: {
|
|
40
|
+
index: 0,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
default: 'get',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
exports.userFields = [
|
|
52
|
+
{
|
|
53
|
+
displayName: 'User Login',
|
|
54
|
+
name: 'userLogin',
|
|
55
|
+
type: 'string',
|
|
56
|
+
displayOptions: {
|
|
57
|
+
show: {
|
|
58
|
+
resource: ['user'],
|
|
59
|
+
operation: ['get'],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
default: '',
|
|
63
|
+
required: true,
|
|
64
|
+
placeholder: 'e.g. username',
|
|
65
|
+
description: 'The user login name',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/User.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,YAAY;gBACpB,WAAW,EAAE,8BAA8B;gBAC3C,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,QAAQ;wBACb,EAAE,EAAE;4BACH,KAAK,EAAE,2BAA2B;yBAClC;qBACD;oBACD,MAAM,EAAE;wBACP,WAAW,EAAE;4BACZ;gCACC,IAAI,EAAE,cAAc;gCACpB,UAAU,EAAE;oCACX,QAAQ,EAAE,MAAM;iCAChB;6BACD;4BACD;gCACC,IAAI,EAAE,aAAa;gCACnB,UAAU,EAAE;oCACX,KAAK,EAAE,CAAC;iCACR;6BACD;yBACD;qBACD;iBACD;aACD;SACD;QACD,OAAO,EAAE,KAAK;KACd;CACD,CAAC;AAEW,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,qBAAqB;KAClC;CACD,CAAC"}
|