分页在 Zend Gdata YouTube API 中不起作用
我正在使用 Zend Gdata YouTube API 在 YouTube 上上传视频。它上传得很好。 我可以轻松地获取页面上的视频。但在此分页不起作用。我正在根据特定用户记录显示视频记录。它在一页上显示所有记录。我们在这里有下一个和后退链接。但单击后,它们会在每个页面上显示相同的记录。
我用过这个: http ://gdata.youtube.com/feeds/api/users/bbc/uploads/?start-index=1&max-results=10 但它只显示 10 个结果。虽然我已经上传了超过12个视频。
我还使用过:
$youTubeService = new Zend_Gdata_YouTube();
$query = $youTubeService->newVideoQuery();
$query->setQuery($searchTerm);
$query->setStartIndex($startIndex);
$query->setMaxResults($maxResults);
$feed = $youTubeService->getUserUploads(NULL,$query);
Here $startIndex
给出每次点击下一个或上一个的更新的 searchindex 值。但它也只给了我 10 个结果。 $maxResults
是否具有任何值 3、4 或 5。
这里我想应用分页来首先访问 5 个视频。然后单击网络链接后应显示接下来的五个结果。
如果有人对此有任何想法,请提供帮助。
I am working on uploads videos on YouTube using Zend Gdata YouTube API. It uploads well.
I can easily fetch the videos on a page. But in this paging doesn't works. i am showing video records on the basis of a specific user records. It shows all records on one page. we have next and back links here. but on click they shows same records on each page.
I have used this: http://gdata.youtube.com/feeds/api/users/bbc/uploads/?start-index=1&max-results=10
But it shows only 10 results. Although I have uploaded more than 12 videos.
I have also used:
$youTubeService = new Zend_Gdata_YouTube();
$query = $youTubeService->newVideoQuery();
$query->setQuery($searchTerm);
$query->setStartIndex($startIndex);
$query->setMaxResults($maxResults);
$feed = $youTubeService->getUserUploads(NULL,$query);
Here $startIndex
gives the updated searchindex value for each click on next or previous. But it also giving me only 10 results. Whether $maxResults
have any value 3, 4 or 5.
here i want to apply pagination to access 5 videos first. then on click of net link next five results should display.
Please help if anyone have some idea about this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您将处理自己的分页。
此查询:
将显示前 10 个结果,您将更改下一个结果的查询:
试试这个,您把事情搞混了。您正在构建一个搜索 uri,然后尝试对特定用户调用它。如果您以不同的方式进行,可能会起作用,这应该可以让您到达起点。
你仍然需要自己处理分页,尽管你可能会找到一种方法将其输入 Zend_Paginator 并使其工作。
It looks like you're going to handle you own pagination.
this query:
will show the first 10 results, you'll have change the query for the next results:
Try this, you were mixing things up. You were building a search uri and then trying to call it on a specific user. Might work if you did it a different way, this should get you to a starting place.
you are still going to have to handle pagination yourself, although you can probably find a way to feed this into Zend_Paginator and make it work.