Youtube API返回2个请求

时间:2017-11-17 20:31:01

标签: typescript youtube-api ionic3 youtube-data-api

我试图通过youtube api v3和打字稿获取来自频道的最新视频... 但为什么它会返回2个请求?

getVideosList() {
return this.http.get('https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=' + this.channelId + '&fields=items/id/videoId,items/snippet/publishedAt,items/snippet/title,items/snippet/thumbnails/high/url&maxResults=20&order=date&type=video&key='+ this.apiKey)
.map((res) => {
  return res.json()['items'];
});

}

enter image description here

0 个答案:

没有答案