gpt4 book ai didi

android - 如何通过 YouTube API 获取特定用户上传的所有视频

转载 作者:行者123 更新时间:2023-12-03 06:32:20 25 4
gpt4 key购买 nike

这是一个简单的问题。我们需要使用 YouTube API 在我们的 Android 应用程序中获取上传到我们 channel 的所有视频。根据 YouTube API v2.0 文档,这是一个非常简单的案例 - https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds#User_Uploaded_Videos .
他们说:

To ensure that the API response contains the most up-to-date information available for the user's videos, do not use any parameters other than start-index and max-results in your request. Requests using other parameters, such as orderby, will return cached results.



伟大的!根据上面的文档,URL 是 https://gdata.youtube.com/feeds/api/users/itcuties/uploads ,但返回的结果并不包含我们所有的视频。这是怎么回事?
问题是, 如何使用 YouTube API 获取给定用户上传的所有视频?

最佳答案

好的,案例解决了 - YouTube API - Get All Videos From User limits? :)
我们需要添加 maxresults 参数 - https://gdata.youtube.com/feeds/api/users/itcuties/uploads?max-results=50
回到编码!祝你今天过得愉快!

关于android - 如何通过 YouTube API 获取特定用户上传的所有视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19080894/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com