質問編集履歴

1

追記

2020/02/01 06:49

投稿

norun07
norun07

スコア8

test CHANGED
File without changes
test CHANGED
@@ -324,50 +324,6 @@
324
324
 
325
325
  ```
326
326
 
327
- ```haml
328
-
329
- %section
330
-
331
- .container
332
-
333
- %p Log in With Google
334
-
335
- %button.btn.red#authorize-button
336
-
337
- Log in
338
-
339
- %button.btn.red#signout-button
340
-
341
- Log Out
342
-
343
- %br/
344
-
345
- #content
346
-
347
- .row
348
-
349
- .col.s6
350
-
351
- %form#channel-form
352
-
353
- .input-field.col.s6
354
-
355
- %input#channel-input{:placeholder => "Enter Channel Name", :type => "text"}
356
-
357
- %input.btn.grey.lighten-2#submits__btn{:type => "submit", :value => "Get Channel Data"}
358
-
359
- .col.s6#channel-data
360
-
361
- .row#video-container
362
-
363
- %script{:src => "/assets/main.js", :type => "text/javascript"}
364
-
365
-
366
-
367
- %script{:onload => "this.onload=function(){};handleClientLoad()", :onreadystatechange => "if (this.readyState === 'complete') this.onload()", :src => "https://apis.google.com/js/api.js"}
368
-
369
- ```
370
-
371
327
  ここからの記述がhtmlとして表示されません。↓
372
328
 
373
329
  特に var videoId = item.snippet.resourceId.videoId;
@@ -623,3 +579,21 @@
623
579
  part:'snippet'ここの記述がjson構造に影響しているのでは?と考えていますがAPI初心者ですので解決の糸口がここ数日全くつかめません。
624
580
 
625
581
  どなたかお力添えよろしくお願い致します。
582
+
583
+
584
+
585
+ 追記:
586
+
587
+ 申し訳ございません。
588
+
589
+ requestVideoPlaylist関数内でエラーが起きたので追記致します。
590
+
591
+ エラー文(Uncaught TypeError: Cannot read property 'list' of undefined)
592
+
593
+
594
+
595
+ var request = gapi.client.youtube.playlistItem.list(requestOptions);
596
+
597
+ この行のlistが未定義だとエラーが出てしまいました。
598
+
599
+ このエラーと上記で質問した部分は関係があるように思われます。