@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,341 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TwitchVideos = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
class TwitchVideos {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.description = {
|
|
8
|
-
displayName: 'Twitch Videos',
|
|
9
|
-
name: 'twitchVideos',
|
|
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 Videos API',
|
|
15
|
-
defaults: {
|
|
16
|
-
name: 'Twitch Videos',
|
|
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: 'Get Videos',
|
|
43
|
-
value: 'getVideos',
|
|
44
|
-
action: 'Get videos',
|
|
45
|
-
description: 'Get videos by user ID, game ID, or video ID',
|
|
46
|
-
routing: {
|
|
47
|
-
request: {
|
|
48
|
-
method: 'GET',
|
|
49
|
-
url: '/videos',
|
|
50
|
-
},
|
|
51
|
-
send: {
|
|
52
|
-
preSend: [
|
|
53
|
-
async function (requestOptions) {
|
|
54
|
-
const queryBy = this.getNodeParameter('queryBy', 0);
|
|
55
|
-
const qs = {};
|
|
56
|
-
if (queryBy === 'userId') {
|
|
57
|
-
const userId = this.getNodeParameter('userId', 0);
|
|
58
|
-
qs.user_id = userId;
|
|
59
|
-
}
|
|
60
|
-
else if (queryBy === 'gameId') {
|
|
61
|
-
const gameId = this.getNodeParameter('gameId', 0);
|
|
62
|
-
qs.game_id = gameId;
|
|
63
|
-
}
|
|
64
|
-
else if (queryBy === 'videoId') {
|
|
65
|
-
const videoIds = this.getNodeParameter('videoIds', 0);
|
|
66
|
-
qs.id = videoIds;
|
|
67
|
-
}
|
|
68
|
-
const additionalFields = this.getNodeParameter('additionalFields', 0, {});
|
|
69
|
-
if (additionalFields.first) {
|
|
70
|
-
qs.first = additionalFields.first;
|
|
71
|
-
}
|
|
72
|
-
if (additionalFields.language) {
|
|
73
|
-
qs.language = additionalFields.language;
|
|
74
|
-
}
|
|
75
|
-
if (additionalFields.period) {
|
|
76
|
-
qs.period = additionalFields.period;
|
|
77
|
-
}
|
|
78
|
-
if (additionalFields.sort) {
|
|
79
|
-
qs.sort = additionalFields.sort;
|
|
80
|
-
}
|
|
81
|
-
if (additionalFields.type) {
|
|
82
|
-
qs.type = additionalFields.type;
|
|
83
|
-
}
|
|
84
|
-
requestOptions.qs = qs;
|
|
85
|
-
return requestOptions;
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
output: {
|
|
90
|
-
postReceive: [
|
|
91
|
-
{
|
|
92
|
-
type: 'rootProperty',
|
|
93
|
-
properties: {
|
|
94
|
-
property: 'data',
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: 'Delete Videos',
|
|
103
|
-
value: 'deleteVideos',
|
|
104
|
-
action: 'Delete videos',
|
|
105
|
-
description: 'Delete one or more videos (requires OAuth2 with channel:manage:videos scope)',
|
|
106
|
-
routing: {
|
|
107
|
-
request: {
|
|
108
|
-
method: 'DELETE',
|
|
109
|
-
url: '/videos',
|
|
110
|
-
},
|
|
111
|
-
send: {
|
|
112
|
-
preSend: [
|
|
113
|
-
async function (requestOptions) {
|
|
114
|
-
const videoIds = this.getNodeParameter('deleteVideoIds', 0);
|
|
115
|
-
requestOptions.qs = {
|
|
116
|
-
id: videoIds,
|
|
117
|
-
};
|
|
118
|
-
return requestOptions;
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
default: 'getVideos',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
displayName: 'Query By',
|
|
129
|
-
name: 'queryBy',
|
|
130
|
-
type: 'options',
|
|
131
|
-
displayOptions: {
|
|
132
|
-
show: {
|
|
133
|
-
operation: ['getVideos'],
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
options: [
|
|
137
|
-
{
|
|
138
|
-
name: 'User ID',
|
|
139
|
-
value: 'userId',
|
|
140
|
-
description: 'Get videos by user ID',
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: 'Game ID',
|
|
144
|
-
value: 'gameId',
|
|
145
|
-
description: 'Get videos by game ID',
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
name: 'Video ID',
|
|
149
|
-
value: 'videoId',
|
|
150
|
-
description: 'Get videos by video ID(s)',
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
default: 'userId',
|
|
154
|
-
required: true,
|
|
155
|
-
description: 'How to query for videos (at least one required)',
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
displayName: 'User ID',
|
|
159
|
-
name: 'userId',
|
|
160
|
-
type: 'string',
|
|
161
|
-
displayOptions: {
|
|
162
|
-
show: {
|
|
163
|
-
operation: ['getVideos'],
|
|
164
|
-
queryBy: ['userId'],
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
default: '',
|
|
168
|
-
required: true,
|
|
169
|
-
placeholder: 'e.g. 123456789',
|
|
170
|
-
description: 'ID of the user who owns the videos',
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
displayName: 'Game ID',
|
|
174
|
-
name: 'gameId',
|
|
175
|
-
type: 'string',
|
|
176
|
-
displayOptions: {
|
|
177
|
-
show: {
|
|
178
|
-
operation: ['getVideos'],
|
|
179
|
-
queryBy: ['gameId'],
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
default: '',
|
|
183
|
-
required: true,
|
|
184
|
-
placeholder: 'e.g. 493057',
|
|
185
|
-
description: 'ID of the game the videos are of',
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
displayName: 'Video IDs',
|
|
189
|
-
name: 'videoIds',
|
|
190
|
-
type: 'string',
|
|
191
|
-
displayOptions: {
|
|
192
|
-
show: {
|
|
193
|
-
operation: ['getVideos'],
|
|
194
|
-
queryBy: ['videoId'],
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
default: '',
|
|
198
|
-
required: true,
|
|
199
|
-
placeholder: 'e.g. 234482848 or 234482848,234482850',
|
|
200
|
-
description: 'ID(s) of the video(s). Separate multiple IDs with commas. Maximum 100 IDs.',
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
displayName: 'Additional Fields',
|
|
204
|
-
name: 'additionalFields',
|
|
205
|
-
type: 'collection',
|
|
206
|
-
placeholder: 'Add Field',
|
|
207
|
-
default: {},
|
|
208
|
-
displayOptions: {
|
|
209
|
-
show: {
|
|
210
|
-
operation: ['getVideos'],
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
options: [
|
|
214
|
-
{
|
|
215
|
-
displayName: 'First',
|
|
216
|
-
name: 'first',
|
|
217
|
-
type: 'number',
|
|
218
|
-
default: 20,
|
|
219
|
-
typeOptions: {
|
|
220
|
-
minValue: 1,
|
|
221
|
-
maxValue: 100,
|
|
222
|
-
},
|
|
223
|
-
description: 'Maximum number of videos to return. Default: 20. Max: 100.',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
displayName: 'Language',
|
|
227
|
-
name: 'language',
|
|
228
|
-
type: 'string',
|
|
229
|
-
default: '',
|
|
230
|
-
placeholder: 'e.g. en',
|
|
231
|
-
description: 'Language of the videos to return (ISO 639-1 two-letter code)',
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
displayName: 'Period',
|
|
235
|
-
name: 'period',
|
|
236
|
-
type: 'options',
|
|
237
|
-
options: [
|
|
238
|
-
{
|
|
239
|
-
name: 'All',
|
|
240
|
-
value: 'all',
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
name: 'Day',
|
|
244
|
-
value: 'day',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: 'Month',
|
|
248
|
-
value: 'month',
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
name: 'Week',
|
|
252
|
-
value: 'week',
|
|
253
|
-
},
|
|
254
|
-
],
|
|
255
|
-
default: 'all',
|
|
256
|
-
description: 'Period during which the videos were created',
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
displayName: 'Sort',
|
|
260
|
-
name: 'sort',
|
|
261
|
-
type: 'options',
|
|
262
|
-
options: [
|
|
263
|
-
{
|
|
264
|
-
name: 'Time',
|
|
265
|
-
value: 'time',
|
|
266
|
-
description: 'Sort by creation time (newest first)',
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
name: 'Trending',
|
|
270
|
-
value: 'trending',
|
|
271
|
-
description: 'Sort by trending',
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: 'Views',
|
|
275
|
-
value: 'views',
|
|
276
|
-
description: 'Sort by view count (highest first)',
|
|
277
|
-
},
|
|
278
|
-
],
|
|
279
|
-
default: 'time',
|
|
280
|
-
description: 'Sort order of the videos',
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
displayName: 'Type',
|
|
284
|
-
name: 'type',
|
|
285
|
-
type: 'options',
|
|
286
|
-
options: [
|
|
287
|
-
{
|
|
288
|
-
name: 'All',
|
|
289
|
-
value: 'all',
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
name: 'Archive',
|
|
293
|
-
value: 'archive',
|
|
294
|
-
description: 'Past broadcasts',
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
name: 'Highlight',
|
|
298
|
-
value: 'highlight',
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
name: 'Upload',
|
|
302
|
-
value: 'upload',
|
|
303
|
-
},
|
|
304
|
-
],
|
|
305
|
-
default: 'all',
|
|
306
|
-
description: 'Type of videos to return',
|
|
307
|
-
},
|
|
308
|
-
],
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
displayName: 'Video IDs',
|
|
312
|
-
name: 'deleteVideoIds',
|
|
313
|
-
type: 'string',
|
|
314
|
-
displayOptions: {
|
|
315
|
-
show: {
|
|
316
|
-
operation: ['deleteVideos'],
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
default: '',
|
|
320
|
-
required: true,
|
|
321
|
-
placeholder: 'e.g. 234482848 or 234482848,234482850',
|
|
322
|
-
description: 'ID(s) of the video(s) to delete. Separate multiple IDs with commas. Maximum 5 IDs.',
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
displayName: 'Note',
|
|
326
|
-
name: 'deleteNote',
|
|
327
|
-
type: 'notice',
|
|
328
|
-
default: '',
|
|
329
|
-
displayOptions: {
|
|
330
|
-
show: {
|
|
331
|
-
operation: ['deleteVideos'],
|
|
332
|
-
},
|
|
333
|
-
},
|
|
334
|
-
description: 'Requires OAuth2 authentication with channel:manage:videos scope. You can only delete videos owned by the authenticated user.',
|
|
335
|
-
},
|
|
336
|
-
],
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
exports.TwitchVideos = TwitchVideos;
|
|
341
|
-
//# sourceMappingURL=TwitchVideos.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TwitchVideos.node.js","sourceRoot":"","sources":["../../../nodes/TwitchVideos/TwitchVideos.node.ts"],"names":[],"mappings":";;;AAAA,+CAAgH;AAEhH,MAAa,YAAY;IAAzB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,sBAAsB,EAAE;YAChE,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE;gBACT,IAAI,EAAE,eAAe;aACrB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,iBAAiB;oBACvB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,6BAA6B;gBACtC,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,YAAY;4BAClB,KAAK,EAAE,WAAW;4BAClB,MAAM,EAAE,YAAY;4BACpB,WAAW,EAAE,6CAA6C;4BAC1D,OAAO,EAAE;gCACR,OAAO,EAAE;oCACR,MAAM,EAAE,KAAK;oCACb,GAAG,EAAE,SAAS;iCACd;gCACD,IAAI,EAAE;oCACL,OAAO,EAAE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="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,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TwitchWhispers = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
class TwitchWhispers {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.description = {
|
|
8
|
-
displayName: 'Twitch Whispers',
|
|
9
|
-
name: 'twitchWhispers',
|
|
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 Whispers API',
|
|
15
|
-
defaults: {
|
|
16
|
-
name: 'Twitch Whispers',
|
|
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: 'Send Whisper',
|
|
43
|
-
value: 'sendWhisper',
|
|
44
|
-
action: 'Send a whisper',
|
|
45
|
-
description: 'Send a whisper message to a user',
|
|
46
|
-
routing: {
|
|
47
|
-
request: {
|
|
48
|
-
method: 'POST',
|
|
49
|
-
url: '/whispers',
|
|
50
|
-
},
|
|
51
|
-
send: {
|
|
52
|
-
preSend: [
|
|
53
|
-
async function (requestOptions) {
|
|
54
|
-
const fromUserId = this.getNodeParameter('fromUserId', 0);
|
|
55
|
-
const toUserId = this.getNodeParameter('toUserId', 0);
|
|
56
|
-
const message = this.getNodeParameter('message', 0);
|
|
57
|
-
requestOptions.qs = {
|
|
58
|
-
from_user_id: fromUserId,
|
|
59
|
-
to_user_id: toUserId,
|
|
60
|
-
};
|
|
61
|
-
requestOptions.body = {
|
|
62
|
-
message,
|
|
63
|
-
};
|
|
64
|
-
return requestOptions;
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
default: 'sendWhisper',
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
displayName: 'From User ID',
|
|
75
|
-
name: 'fromUserId',
|
|
76
|
-
type: 'string',
|
|
77
|
-
required: true,
|
|
78
|
-
default: '',
|
|
79
|
-
placeholder: 'e.g. 123456789',
|
|
80
|
-
description: 'The ID of the user sending the whisper',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
displayName: 'To User ID',
|
|
84
|
-
name: 'toUserId',
|
|
85
|
-
type: 'string',
|
|
86
|
-
required: true,
|
|
87
|
-
default: '',
|
|
88
|
-
placeholder: 'e.g. 987654321',
|
|
89
|
-
description: 'The ID of the user to receive the whisper',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
displayName: 'Message',
|
|
93
|
-
name: 'message',
|
|
94
|
-
type: 'string',
|
|
95
|
-
required: true,
|
|
96
|
-
default: '',
|
|
97
|
-
placeholder: 'e.g. Hello from n8n!',
|
|
98
|
-
description: 'The whisper message to send (maximum 500 characters)',
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
exports.TwitchWhispers = TwitchWhispers;
|
|
105
|
-
//# sourceMappingURL=TwitchWhispers.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TwitchWhispers.node.js","sourceRoot":"","sources":["../../../nodes/TwitchWhispers/TwitchWhispers.node.ts"],"names":[],"mappings":";;;AAAA,+CAA8F;AAE9F,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,sBAAsB,EAAE;YAChE,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE;gBACT,IAAI,EAAE,iBAAiB;aACvB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,iBAAiB;oBACvB,QAAQ,EAAE,IAAI;iBACd;aACD;Y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D;gBACD;oBACC,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,gBAAgB;oBAC7B,WAAW,EAAE,2CAA2C;iBACxD;gBACD;oBACC,WAAW,EAAE,SAAS;oBACtB,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,sBAAsB;oBACnC,WAAW,EAAE,sDAAsD;iBACnE;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAnGD,wCAmGC"}
|
|
@@ -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>
|
|
File without changes
|
|
File without changes
|