@yuniruyuni/n8n-nodes-twitch 0.1.4 → 0.1.6
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/credentials/TwitchOAuth2Api.credentials.d.ts +2 -1
- package/dist/credentials/TwitchOAuth2Api.credentials.js +8 -0
- package/dist/credentials/TwitchOAuth2Api.credentials.js.map +1 -1
- package/dist/nodes/{TwitchBans/TwitchBans.node.d.ts → Twitch/Twitch.node.d.ts} +1 -1
- package/dist/nodes/Twitch/Twitch.node.js +145 -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 +146 -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 +324 -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 +152 -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 +78 -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 +110 -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 +109 -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 +73 -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 +273 -0
- package/dist/nodes/Twitch/resources/Clip.js.map +1 -0
- package/dist/nodes/Twitch/resources/CustomReward.d.ts +3 -0
- package/dist/nodes/Twitch/resources/CustomReward.js +564 -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 +72 -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 +209 -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 +268 -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 +411 -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 +367 -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 +161 -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 +260 -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 +415 -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 +108 -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 +190 -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 +168 -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 +323 -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.d.ts +2 -0
- package/dist/nodes/Twitch/shared/userIdConverter.js +32 -0
- package/dist/nodes/Twitch/shared/userIdConverter.js.map +1 -0
- package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js +6 -4
- 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 -166
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js.map +0 -1
- package/dist/nodes/TwitchBans/TwitchBans.node.js +0 -324
- 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 -172
- 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 -94
- 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 -130
- 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 -118
- 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 -83
- 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 -278
- 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 -576
- 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 -95
- 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 -280
- 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 -422
- 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 -378
- 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 -162
- 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 -271
- 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 -427
- 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 -202
- 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 -189
- 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 -341
- 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/{TwitchAnnouncements → Twitch}/twitch.dark.svg +0 -0
- /package/dist/nodes/{TwitchAnnouncements → Twitch}/twitch.svg +0 -0
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TwitchPredictions = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
class TwitchPredictions {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.description = {
|
|
8
|
-
displayName: 'Twitch Predictions',
|
|
9
|
-
name: 'twitchPredictions',
|
|
10
|
-
icon: { light: 'file:twitch.svg', dark: 'file:twitch.dark.svg' },
|
|
11
|
-
group: ['transform'],
|
|
12
|
-
version: 1,
|
|
13
|
-
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
-
description: 'Interact with Twitch Predictions API',
|
|
15
|
-
defaults: {
|
|
16
|
-
name: 'Twitch Predictions',
|
|
17
|
-
},
|
|
18
|
-
usableAsTool: true,
|
|
19
|
-
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
20
|
-
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
-
credentials: [
|
|
22
|
-
{
|
|
23
|
-
name: 'twitchOAuth2Api',
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
requestDefaults: {
|
|
28
|
-
baseURL: 'https://api.twitch.tv/helix',
|
|
29
|
-
headers: {
|
|
30
|
-
Accept: 'application/json',
|
|
31
|
-
'Content-Type': 'application/json',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
properties: [
|
|
35
|
-
{
|
|
36
|
-
displayName: 'Operation',
|
|
37
|
-
name: 'operation',
|
|
38
|
-
type: 'options',
|
|
39
|
-
noDataExpression: true,
|
|
40
|
-
options: [
|
|
41
|
-
{
|
|
42
|
-
name: 'Create Prediction',
|
|
43
|
-
value: 'createPrediction',
|
|
44
|
-
action: 'Create a prediction',
|
|
45
|
-
description: 'Create a Channel Points Prediction',
|
|
46
|
-
routing: {
|
|
47
|
-
request: {
|
|
48
|
-
method: 'POST',
|
|
49
|
-
url: '/predictions',
|
|
50
|
-
},
|
|
51
|
-
send: {
|
|
52
|
-
preSend: [
|
|
53
|
-
async function (requestOptions) {
|
|
54
|
-
const broadcasterId = this.getNodeParameter('broadcasterId', 0);
|
|
55
|
-
const title = this.getNodeParameter('title', 0);
|
|
56
|
-
const predictionWindow = this.getNodeParameter('predictionWindow', 0);
|
|
57
|
-
const outcome1Title = this.getNodeParameter('outcome1Title', 0);
|
|
58
|
-
const outcome2Title = this.getNodeParameter('outcome2Title', 0);
|
|
59
|
-
const body = {
|
|
60
|
-
broadcaster_id: broadcasterId,
|
|
61
|
-
title: title,
|
|
62
|
-
outcomes: [
|
|
63
|
-
{ title: outcome1Title },
|
|
64
|
-
{ title: outcome2Title },
|
|
65
|
-
],
|
|
66
|
-
prediction_window: predictionWindow,
|
|
67
|
-
};
|
|
68
|
-
requestOptions.body = body;
|
|
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
|
-
name: 'Get Predictions',
|
|
93
|
-
value: 'getPredictions',
|
|
94
|
-
action: 'Get predictions',
|
|
95
|
-
description: 'Get Channel Points Predictions',
|
|
96
|
-
routing: {
|
|
97
|
-
request: {
|
|
98
|
-
method: 'GET',
|
|
99
|
-
url: '/predictions',
|
|
100
|
-
},
|
|
101
|
-
send: {
|
|
102
|
-
preSend: [
|
|
103
|
-
async function (requestOptions) {
|
|
104
|
-
const broadcasterId = this.getNodeParameter('broadcasterId', 0);
|
|
105
|
-
const qs = {
|
|
106
|
-
broadcaster_id: broadcasterId,
|
|
107
|
-
};
|
|
108
|
-
const predictionId = this.getNodeParameter('predictionId', '');
|
|
109
|
-
if (predictionId) {
|
|
110
|
-
qs.id = predictionId;
|
|
111
|
-
}
|
|
112
|
-
const first = this.getNodeParameter('first', '');
|
|
113
|
-
if (first) {
|
|
114
|
-
qs.first = first;
|
|
115
|
-
}
|
|
116
|
-
requestOptions.qs = qs;
|
|
117
|
-
return requestOptions;
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
output: {
|
|
122
|
-
postReceive: [
|
|
123
|
-
{
|
|
124
|
-
type: 'rootProperty',
|
|
125
|
-
properties: {
|
|
126
|
-
property: 'data',
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: 'End Prediction',
|
|
135
|
-
value: 'endPrediction',
|
|
136
|
-
action: 'End a prediction',
|
|
137
|
-
description: 'End a Channel Points Prediction',
|
|
138
|
-
routing: {
|
|
139
|
-
request: {
|
|
140
|
-
method: 'PATCH',
|
|
141
|
-
url: '/predictions',
|
|
142
|
-
},
|
|
143
|
-
send: {
|
|
144
|
-
preSend: [
|
|
145
|
-
async function (requestOptions) {
|
|
146
|
-
const broadcasterId = this.getNodeParameter('broadcasterId', 0);
|
|
147
|
-
const predictionId = this.getNodeParameter('endPredictionId', 0);
|
|
148
|
-
const status = this.getNodeParameter('status', 0);
|
|
149
|
-
const body = {
|
|
150
|
-
broadcaster_id: broadcasterId,
|
|
151
|
-
id: predictionId,
|
|
152
|
-
status: status,
|
|
153
|
-
};
|
|
154
|
-
if (status === 'RESOLVED') {
|
|
155
|
-
const winningOutcomeId = this.getNodeParameter('winningOutcomeId', 0);
|
|
156
|
-
body.winning_outcome_id = winningOutcomeId;
|
|
157
|
-
}
|
|
158
|
-
requestOptions.body = body;
|
|
159
|
-
return requestOptions;
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
},
|
|
163
|
-
output: {
|
|
164
|
-
postReceive: [
|
|
165
|
-
{
|
|
166
|
-
type: 'rootProperty',
|
|
167
|
-
properties: {
|
|
168
|
-
property: 'data',
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
type: 'setKeyValue',
|
|
173
|
-
properties: {
|
|
174
|
-
index: 0,
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
],
|
|
182
|
-
default: 'getPredictions',
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
displayName: 'Broadcaster ID',
|
|
186
|
-
name: 'broadcasterId',
|
|
187
|
-
type: 'string',
|
|
188
|
-
displayOptions: {
|
|
189
|
-
show: {
|
|
190
|
-
operation: ['createPrediction'],
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
default: '',
|
|
194
|
-
required: true,
|
|
195
|
-
placeholder: 'e.g. 123456789',
|
|
196
|
-
description: 'The broadcaster running the prediction',
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
displayName: 'Title',
|
|
200
|
-
name: 'title',
|
|
201
|
-
type: 'string',
|
|
202
|
-
displayOptions: {
|
|
203
|
-
show: {
|
|
204
|
-
operation: ['createPrediction'],
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
default: '',
|
|
208
|
-
required: true,
|
|
209
|
-
placeholder: 'e.g. Will I win this match?',
|
|
210
|
-
description: 'The question that viewers are predicting. Maximum: 45 characters.',
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
displayName: 'Outcome 1 Title',
|
|
214
|
-
name: 'outcome1Title',
|
|
215
|
-
type: 'string',
|
|
216
|
-
displayOptions: {
|
|
217
|
-
show: {
|
|
218
|
-
operation: ['createPrediction'],
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
default: '',
|
|
222
|
-
required: true,
|
|
223
|
-
placeholder: 'e.g. Yes',
|
|
224
|
-
description: 'The title for the first outcome. Maximum: 25 characters.',
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
displayName: 'Outcome 2 Title',
|
|
228
|
-
name: 'outcome2Title',
|
|
229
|
-
type: 'string',
|
|
230
|
-
displayOptions: {
|
|
231
|
-
show: {
|
|
232
|
-
operation: ['createPrediction'],
|
|
233
|
-
},
|
|
234
|
-
},
|
|
235
|
-
default: '',
|
|
236
|
-
required: true,
|
|
237
|
-
placeholder: 'e.g. No',
|
|
238
|
-
description: 'The title for the second outcome. Maximum: 25 characters.',
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
displayName: 'Prediction Window',
|
|
242
|
-
name: 'predictionWindow',
|
|
243
|
-
type: 'number',
|
|
244
|
-
displayOptions: {
|
|
245
|
-
show: {
|
|
246
|
-
operation: ['createPrediction'],
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
default: 120,
|
|
250
|
-
required: true,
|
|
251
|
-
typeOptions: {
|
|
252
|
-
minValue: 30,
|
|
253
|
-
maxValue: 1800,
|
|
254
|
-
},
|
|
255
|
-
description: 'The length of time (in seconds) that viewers have to make a prediction. Minimum: 30. Maximum: 1800.',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
displayName: 'Broadcaster ID',
|
|
259
|
-
name: 'broadcasterId',
|
|
260
|
-
type: 'string',
|
|
261
|
-
displayOptions: {
|
|
262
|
-
show: {
|
|
263
|
-
operation: ['getPredictions'],
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
default: '',
|
|
267
|
-
required: true,
|
|
268
|
-
placeholder: 'e.g. 123456789',
|
|
269
|
-
description: 'The broadcaster whose predictions you want to get',
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
displayName: 'Prediction ID',
|
|
273
|
-
name: 'predictionId',
|
|
274
|
-
type: 'string',
|
|
275
|
-
displayOptions: {
|
|
276
|
-
show: {
|
|
277
|
-
operation: ['getPredictions'],
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
default: '',
|
|
281
|
-
placeholder: 'e.g. abc123-def456-ghi789',
|
|
282
|
-
description: 'The ID of the prediction to get. If not specified, returns all predictions for the broadcaster.',
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
displayName: 'First',
|
|
286
|
-
name: 'first',
|
|
287
|
-
type: 'number',
|
|
288
|
-
displayOptions: {
|
|
289
|
-
show: {
|
|
290
|
-
operation: ['getPredictions'],
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
default: 20,
|
|
294
|
-
typeOptions: {
|
|
295
|
-
minValue: 1,
|
|
296
|
-
maxValue: 20,
|
|
297
|
-
},
|
|
298
|
-
description: 'Maximum number of predictions to return (1-20)',
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
displayName: 'Broadcaster ID',
|
|
302
|
-
name: 'broadcasterId',
|
|
303
|
-
type: 'string',
|
|
304
|
-
displayOptions: {
|
|
305
|
-
show: {
|
|
306
|
-
operation: ['endPrediction'],
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
default: '',
|
|
310
|
-
required: true,
|
|
311
|
-
placeholder: 'e.g. 123456789',
|
|
312
|
-
description: 'The broadcaster running the prediction',
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
displayName: 'Prediction ID',
|
|
316
|
-
name: 'endPredictionId',
|
|
317
|
-
type: 'string',
|
|
318
|
-
displayOptions: {
|
|
319
|
-
show: {
|
|
320
|
-
operation: ['endPrediction'],
|
|
321
|
-
},
|
|
322
|
-
},
|
|
323
|
-
default: '',
|
|
324
|
-
required: true,
|
|
325
|
-
placeholder: 'e.g. abc123-def456-ghi789',
|
|
326
|
-
description: 'The ID of the prediction to end',
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
displayName: 'Status',
|
|
330
|
-
name: 'status',
|
|
331
|
-
type: 'options',
|
|
332
|
-
displayOptions: {
|
|
333
|
-
show: {
|
|
334
|
-
operation: ['endPrediction'],
|
|
335
|
-
},
|
|
336
|
-
},
|
|
337
|
-
options: [
|
|
338
|
-
{
|
|
339
|
-
name: 'RESOLVED',
|
|
340
|
-
value: 'RESOLVED',
|
|
341
|
-
description: 'The winning outcome is determined and points are distributed',
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
name: 'CANCELED',
|
|
345
|
-
value: 'CANCELED',
|
|
346
|
-
description: 'The prediction is canceled and points are refunded',
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
name: 'LOCKED',
|
|
350
|
-
value: 'LOCKED',
|
|
351
|
-
description: 'The prediction is locked and viewers can no longer make predictions',
|
|
352
|
-
},
|
|
353
|
-
],
|
|
354
|
-
default: 'RESOLVED',
|
|
355
|
-
required: true,
|
|
356
|
-
description: 'The status to set the prediction to',
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
displayName: 'Winning Outcome ID',
|
|
360
|
-
name: 'winningOutcomeId',
|
|
361
|
-
type: 'string',
|
|
362
|
-
displayOptions: {
|
|
363
|
-
show: {
|
|
364
|
-
operation: ['endPrediction'],
|
|
365
|
-
status: ['RESOLVED'],
|
|
366
|
-
},
|
|
367
|
-
},
|
|
368
|
-
default: '',
|
|
369
|
-
required: true,
|
|
370
|
-
placeholder: 'e.g. outcome123',
|
|
371
|
-
description: 'The ID of the winning outcome (required when status is RESOLVED)',
|
|
372
|
-
},
|
|
373
|
-
],
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
exports.TwitchPredictions = TwitchPredictions;
|
|
378
|
-
//# sourceMappingURL=TwitchPredictions.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TwitchPredictions.node.js","sourceRoot":"","sources":["../../../nodes/TwitchPredictions/TwitchPredictions.node.ts"],"names":[],"mappings":";;;AAAA,+CAAgH;AAEhH,MAAa,iBAAiB;IAA9B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,mBAAmB;Y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ACjB,WAAW,EAAE,oDAAoD;yBACjE;wBACD;4BACC,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,QAAQ;4BACf,WAAW,EAAE,qEAAqE;yBAClF;qBACD;oBACD,OAAO,EAAE,UAAU;oBACnB,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,qCAAqC;iBAClD;gBACD;oBACC,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,kBAAkB;oBACxB,IAAI,EAAE,QAAQ;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,SAAS,EAAE,CAAC,eAAe,CAAC;4BAC5B,MAAM,EAAE,CAAC,UAAU,CAAC;yBACpB;qBACD;oBACD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,iBAAiB;oBAC9B,WAAW,EAAE,kEAAkE;iBAC/E;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA5XD,8CA4XC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitch</title><path fill="#FFFFFF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitch</title><path d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/></svg>
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TwitchRaids = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
class TwitchRaids {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.description = {
|
|
8
|
-
displayName: 'Twitch Raids',
|
|
9
|
-
name: 'twitchRaids',
|
|
10
|
-
icon: { light: 'file:twitch.svg', dark: 'file:twitch.dark.svg' },
|
|
11
|
-
group: ['transform'],
|
|
12
|
-
version: 1,
|
|
13
|
-
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
-
description: 'Interact with Twitch Raids API',
|
|
15
|
-
defaults: {
|
|
16
|
-
name: 'Twitch Raids',
|
|
17
|
-
},
|
|
18
|
-
usableAsTool: true,
|
|
19
|
-
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
20
|
-
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
-
credentials: [
|
|
22
|
-
{
|
|
23
|
-
name: 'twitchOAuth2Api',
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
requestDefaults: {
|
|
28
|
-
baseURL: 'https://api.twitch.tv/helix',
|
|
29
|
-
headers: {
|
|
30
|
-
Accept: 'application/json',
|
|
31
|
-
'Content-Type': 'application/json',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
properties: [
|
|
35
|
-
{
|
|
36
|
-
displayName: 'Operation',
|
|
37
|
-
name: 'operation',
|
|
38
|
-
type: 'options',
|
|
39
|
-
noDataExpression: true,
|
|
40
|
-
options: [
|
|
41
|
-
{
|
|
42
|
-
name: 'Start Raid',
|
|
43
|
-
value: 'startRaid',
|
|
44
|
-
action: 'Start a raid',
|
|
45
|
-
description: 'Start a raid from one broadcaster to another',
|
|
46
|
-
routing: {
|
|
47
|
-
request: {
|
|
48
|
-
method: 'POST',
|
|
49
|
-
url: '/raids',
|
|
50
|
-
qs: {
|
|
51
|
-
from_broadcaster_id: '={{$parameter.fromBroadcasterId}}',
|
|
52
|
-
to_broadcaster_id: '={{$parameter.toBroadcasterId}}',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
output: {
|
|
56
|
-
postReceive: [
|
|
57
|
-
{
|
|
58
|
-
type: 'rootProperty',
|
|
59
|
-
properties: {
|
|
60
|
-
property: 'data',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
type: 'setKeyValue',
|
|
65
|
-
properties: {
|
|
66
|
-
index: 0,
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'Cancel Raid',
|
|
75
|
-
value: 'cancelRaid',
|
|
76
|
-
action: 'Cancel a raid',
|
|
77
|
-
description: 'Cancel a pending raid',
|
|
78
|
-
routing: {
|
|
79
|
-
request: {
|
|
80
|
-
method: 'DELETE',
|
|
81
|
-
url: '/raids',
|
|
82
|
-
qs: {
|
|
83
|
-
broadcaster_id: '={{$parameter.broadcasterId}}',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
default: 'startRaid',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
displayName: 'From Broadcaster ID',
|
|
93
|
-
name: 'fromBroadcasterId',
|
|
94
|
-
type: 'string',
|
|
95
|
-
displayOptions: {
|
|
96
|
-
show: {
|
|
97
|
-
operation: ['startRaid'],
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
default: '',
|
|
101
|
-
required: true,
|
|
102
|
-
placeholder: 'e.g. 123456789',
|
|
103
|
-
description: 'The ID of the broadcaster that is starting the raid (must be the authenticated user)',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
displayName: 'To Broadcaster ID',
|
|
107
|
-
name: 'toBroadcasterId',
|
|
108
|
-
type: 'string',
|
|
109
|
-
displayOptions: {
|
|
110
|
-
show: {
|
|
111
|
-
operation: ['startRaid'],
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
default: '',
|
|
115
|
-
required: true,
|
|
116
|
-
placeholder: 'e.g. 987654321',
|
|
117
|
-
description: 'The ID of the broadcaster to raid',
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
displayName: 'Note',
|
|
121
|
-
name: 'startRaidNote',
|
|
122
|
-
type: 'notice',
|
|
123
|
-
default: '',
|
|
124
|
-
displayOptions: {
|
|
125
|
-
show: {
|
|
126
|
-
operation: ['startRaid'],
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
description: 'Requires OAuth2 authentication with channel:manage:raids scope. The authenticated user must match the from_broadcaster_id.',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
displayName: 'Broadcaster ID',
|
|
133
|
-
name: 'broadcasterId',
|
|
134
|
-
type: 'string',
|
|
135
|
-
displayOptions: {
|
|
136
|
-
show: {
|
|
137
|
-
operation: ['cancelRaid'],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
default: '',
|
|
141
|
-
required: true,
|
|
142
|
-
placeholder: 'e.g. 123456789',
|
|
143
|
-
description: 'The ID of the broadcaster that initiated the raid (must be the authenticated user)',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
displayName: 'Note',
|
|
147
|
-
name: 'cancelRaidNote',
|
|
148
|
-
type: 'notice',
|
|
149
|
-
default: '',
|
|
150
|
-
displayOptions: {
|
|
151
|
-
show: {
|
|
152
|
-
operation: ['cancelRaid'],
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
description: 'Requires OAuth2 authentication with channel:manage:raids scope. You can only cancel a raid that has not been completed.',
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
exports.TwitchRaids = TwitchRaids;
|
|
162
|
-
//# sourceMappingURL=TwitchRaids.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TwitchRaids.node.js","sourceR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,CAAC;yBACxB;qBACD;oBACD,WAAW,EAAE,4HAA4H;iBACzI;gBAED;oBACC,WAAW,EAAE,gBAAgB;oBAC7B,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,QAAQ;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,SAAS,EAAE,CAAC,YAAY,CAAC;yBACzB;qBACD;oBACD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,gBAAgB;oBAC7B,WAAW,EAAE,oFAAoF;iBACjG;gBACD;oBACC,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,SAAS,EAAE,CAAC,YAAY,CAAC;yBACzB;qBACD;oBACD,WAAW,EAAE,yHAAyH;iBACtI;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA3JD,kCA2JC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitch</title><path fill="#FFFFFF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitch</title><path d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/></svg>
|