-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathyoutube.html
288 lines (275 loc) · 12.8 KB
/
youtube.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<script type="text/x-red" data-template-name="google-config">
<div class="form-row">
<label for="node-config-input-apikey"><i class="fa fa-bookmark"></i>API Key</label>
<input class="input-append-left" type="text" id="node-config-input-apikey" style="width: 40%;" >
</div>
</script>
<script type="text/javascript">
(function() {
RED.nodes.registerType('google-config',{
category: 'config',
defaults: { },
credentials: {
apikey: {required:true}
},
label: function() {
return "Google API Key";
},
exportable: false,
});
})();
</script>
<script type="text/x-red" data-template-name="YouTube PlayListItems">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i> APIKey</label>
<input type="text" id="node-input-config">
</div>
<div class="form-row node-input-part">
<label for="node-input-part"><i class="fa fa-list-ul"></i> part</label>
<select id="node-input-part" style="width:125px !important">
<option value="snippet">snippet</option>
<option value="contentDetails">contentDetails</option>
<option value="id">id</option>
<option value="status">status</option>
</select>
</div>
<div class="form-row node-input-playlistId">
<label for="node-input-playlistId"><i class="fa fa-tag"></i> playlistId</label>
<input type="text" id="node-input-playlistId" placeholder="playlistId">
</div>
<div class="form-row node-input-playlistItemIds">
<label for="node-input-playlistItemIds"><i class="fa fa-file"></i> id</label>
<input type="text" id="node-input-playlistItemIds" placeholder="playlist item id1, playlist item id2, ...">
</div>
<div class="form-row node-input-maxResults">
<label for="node-input-maxResults"><i class="fa fa-tag"></i> maxResults</label>
<input type="text" id="node-input-maxResults" placeholder="maxResults (1-50)">
</div>
<div class="form-row node-input-onBehalfOfContentOwner">
<label for="node-input-onBehalfOfContentOwner"><i class="fa fa-tag"></i> onBehalfOfContentOwner</label>
<input type="text" id="node-input-onBehalfOfContentOwner" placeholder="onBehalfOfContentOwner">
</div>
<div class="form-row node-input-videoId">
<label for="node-input-videoId"><i class="fa fa-tag"></i> videoId</label>
<input type="text" id="node-input-videoId" placeholder="videoId">
</div>
<div class="form-row node-input-pageToken">
<label for="node-input-pageToken"><i class="fa fa-tag"></i> pageToken</label>
<input type="text" id="node-input-pageToken" placeholder="pageToken">
</div>
<div class="form-row node-input-fields">
<label for="node-input-fields"><i class="fa fa-tag"></i> fields</label>
<input type="text" id="node-input-fields" placeholder="fields">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="YouTube PlayListItems">
<p>Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.</p>
<p>See <a href="https://developers.google.com/youtube/v3/docs/playlistItems/list">Youtube Data API PlaylistItems List</a></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('YouTube PlayListItems',{
category: 'social',
color:"#C0DEED",
defaults: {
config: {type:"google-config",required:true},
part: {value: "snippet",required:true},
playlistId: {value: ""},
playlistItemIds: {value: ""},
maxResults: {value:5},
onBehalfOfContentOwner: {value: ""},
pageToken: {value: ""},
videoId: {value: "" },
fields: {value: "" },
name: {value:""}
},
inputs:1,
outputs:1,
icon: "youtube.png",
label: function() {
return this.name ? "YT "+this.name : "PlayListItems";
}
});
</script>
<script type="text/x-red" data-template-name="YouTube PlayLists">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i> APIKey</label>
<input type="text" id="node-input-config">
</div>
<div class="form-row node-input-part">
<label for="node-input-part"><i class="fa fa-list-ul"></i> part</label>
<select id="node-input-part" style="width:125px !important">
<option value="snippet">snippet</option>
<option value="contentDetails">contentDetails</option>
<option value="id">id</option>
<option value="player">player</option>
<option value="status">status</option>
</select>
</div>
<div class="form-row node-input-channelId">
<label for="node-input-channelId"><i class="fa fa-tag"></i> channelId</label>
<input type="text" id="node-input-channelId" placeholder="channelId">
</div>
<div class="form-row node-input-playlistId">
<label for="node-input-playlistId"><i class="fa fa-tag"></i> id</label>
<input type="text" id="node-input-playlistId" placeholder="Playlist id">
</div>
<div class="form-row node-input-mine">
<label for="node-input-mine"><i class="fa fa-tag"></i> mine</label>
<select id="node-input-mine" style="width:125px !important">
<option value="">false</option>
<option value="true">true</option>
</select>
</div>
<div class="form-row node-input-maxResults">
<label for="node-input-maxResults"><i class="fa fa-tag"></i> maxResults</label>
<input type="text" id="node-input-maxResults" placeholder="maxResults (1-50)">
</div>
<div class="form-row node-input-onBehalfOfContentOwner">
<label for="node-input-onBehalfOfContentOwner"><i class="fa fa-tag"></i> onBehalfOfContentOwner</label>
<input type="text" id="node-input-onBehalfOfContentOwner" placeholder="onBehalfOfContentOwner">
</div>
<div class="form-row node-input-onBehalfOfContentOwnerChannel">
<label for="node-input-onBehalfOfContentOwnerChannel"><i class="fa fa-tag"></i> onBehalfOfContentOwnerChannel</label>
<input type="text" id="node-input-onBehalfOfContentOwnerChannel" placeholder="onBehalfOfContentOwnerChannel">
</div>
<div class="form-row node-input-pageToken">
<label for="node-input-pageToken"><i class="fa fa-tag"></i> pageToken</label>
<input type="text" id="node-input-pageToken" placeholder="pageToken">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="YouTube PlayLists">
<p>Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.</p>
<p>See <a href="https://developers.google.com/youtube/v3/docs/playlists/list">Youtube Data API Playlists List</a></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('YouTube PlayLists',{
category: 'social',
color:"#C0DEED",
defaults: {
config: {type:"google-config", required: true},
part: {value: "snippet", required: true},
channelId: {value: ""},
playlistId: {value: ""},
mine: {value: ""},
maxResults: {value:5},
onBehalfOfContentOwner: {value: ""},
onBehalfOfContentOwnerChannel: {value: ""},
pageToken: {value: ""},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "youtube.png",
label: function() {
return this.name ? "YT "+this.name : "PlayLists";
}
});
</script>
<script type="text/x-red" data-template-name="YouTube Channels">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i> APIKey</label>
<input type="text" id="node-input-config">
</div>
<div class="form-row node-input-part">
<label for="node-input-part"><i class="fa fa-list-ul"></i> part</label>
<select id="node-input-part" style="width:125px !important">
<option value="snippet">snippet</option>
<option value="auditDetails">auditDetails</option>
<option value="brandingSettings">brandingSettings</option>
<option value="contentDetails">contentDetails</option>
<option value="contentOwnerDetails">contentOwnerDetails</option>
<option value="id">id</option>
<option value="invideoPromotion">invideoPromotion</option>
<option value="statistics">statistics</option>
<option value="status">status</option>
<option value="topicDetails">topicDetails</option>
</select>
</div>
<div class="form-row node-input-categoryId">
<label for="node-input-categoryId"><i class="fa fa-tag"></i> categoryId</label>
<input type="text" id="node-input-categoryId" placeholder="categoryId">
</div>
<div class="form-row node-input-forUsername">
<label for="node-input-forUsername"><i class="fa fa-tag"></i> forUsername</label>
<input type="text" id="node-input-forUsername" placeholder="forUsername">
</div>
<div class="form-row node-input-channelIds">
<label for="node-input-channelIds"><i class="fa fa-tag"></i> channelIds</label>
<input type="text" id="node-input-channelIds" placeholder="channelId, channelId, ...">
</div>
<div class="form-row node-input-managedByMe">
<label for="node-input-managedByMe"><i class="fa fa-tag"></i> managedByMe</label>
<select id="node-input-managedByMe" style="width:125px !important">
<option value="">false</option>
<option value="true">true</option>
</select>
</div>
<div class="form-row node-input-mine">
<label for="node-input-mine"><i class="fa fa-tag"></i> mine</label>
<select id="node-input-mine" style="width:125px !important">
<option value="">false</option>
<option value="true">true</option>
</select>
</div>
<div class="form-row node-input-mySubscribers">
<label for="node-input-mySubscribers"><i class="fa fa-tag"></i> mySubscribers</label>
<select id="node-input-mySubscribers" style="width:125px !important">
<option value="">false</option>
<option value="true">true</option>
</select>
</div>
<div class="form-row node-input-maxResults">
<label for="node-input-maxResults"><i class="fa fa-tag"></i> maxResults</label>
<input type="text" id="node-input-maxResults" placeholder="maxResults (1-50)">
</div>
<div class="form-row node-input-onBehalfOfContentOwner">
<label for="node-input-onBehalfOfContentOwner"><i class="fa fa-tag"></i> onBehalfOfContentOwner</label>
<input type="text" id="node-input-onBehalfOfContentOwner" placeholder="onBehalfOfContentOwner">
</div>
<div class="form-row node-input-pageToken">
<label for="node-input-pageToken"><i class="fa fa-tag"></i> pageToken</label>
<input type="text" id="node-input-pageToken" placeholder="pageToken">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="YouTube Channels">
<p>Returns a collection of zero or more channel resources that match the request criteria.</p>
<p>See <a href="https://developers.google.com/youtube/v3/docs/channels/list">Youtube Data API Channels List</a></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('YouTube Channels',{
category: 'social',
color:"#C0DEED",
defaults: {
config: {type:"google-config",required:true},
part: {value: "snippet",required:true},
categoryId: {value: ""},
forUsername: {value: ""},
channelIds: {value: ""},
managedByMe: {value: ""},
mine: {value: ""},
mySubscribers: {value: ""},
maxResults: {value:5},
onBehalfOfContentOwner: {value: ""},
pageToken: {value: ""},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "youtube.png",
label: function() {
return this.name ? "YT "+this.name : "Channels";
}
});
</script>