• <small id='m1QAk'></small><noframes id='m1QAk'>

    <legend id='m1QAk'><style id='m1QAk'><dir id='m1QAk'><q id='m1QAk'></q></dir></style></legend>
        <bdo id='m1QAk'></bdo><ul id='m1QAk'></ul>

        <tfoot id='m1QAk'></tfoot>
      1. <i id='m1QAk'><tr id='m1QAk'><dt id='m1QAk'><q id='m1QAk'><span id='m1QAk'><b id='m1QAk'><form id='m1QAk'><ins id='m1QAk'></ins><ul id='m1QAk'></ul><sub id='m1QAk'></sub></form><legend id='m1QAk'></legend><bdo id='m1QAk'><pre id='m1QAk'><center id='m1QAk'></center></pre></bdo></b><th id='m1QAk'></th></span></q></dt></tr></i><div id='m1QAk'><tfoot id='m1QAk'></tfoot><dl id='m1QAk'><fieldset id='m1QAk'></fieldset></dl></div>

        YouTube API V3:在哪里可以找到每个“videoCategoryId"的列表?

        时间:2023-07-14
          <tbody id='J2qzV'></tbody>
        <legend id='J2qzV'><style id='J2qzV'><dir id='J2qzV'><q id='J2qzV'></q></dir></style></legend>

        • <bdo id='J2qzV'></bdo><ul id='J2qzV'></ul>
        • <tfoot id='J2qzV'></tfoot>

              <i id='J2qzV'><tr id='J2qzV'><dt id='J2qzV'><q id='J2qzV'><span id='J2qzV'><b id='J2qzV'><form id='J2qzV'><ins id='J2qzV'></ins><ul id='J2qzV'></ul><sub id='J2qzV'></sub></form><legend id='J2qzV'></legend><bdo id='J2qzV'><pre id='J2qzV'><center id='J2qzV'></center></pre></bdo></b><th id='J2qzV'></th></span></q></dt></tr></i><div id='J2qzV'><tfoot id='J2qzV'></tfoot><dl id='J2qzV'><fieldset id='J2qzV'></fieldset></dl></div>

              <small id='J2qzV'></small><noframes id='J2qzV'>

                  本文介绍了YouTube API V3:在哪里可以找到每个“videoCategoryId"的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用的是 Youtube API V3,但找不到有关如何按类别过滤的文档:

                  I'm using the Youtube API V3 but can't find documentation for how to filter by category:

                  这是我的代码:

                  $results = $youtube->search->listSearch('id,snippet', array(
                      'q' =>                  $_GET['q'],
                      'maxResults' =>         20,
                      'type' =>               'video'
                      'videoCategoryId' =>    'what-do-i-put-here?',
                  ));
                  

                  我已经浏览了他们的文档一个小时,但似乎找不到任何关于我如何找出各种类别的 ID 的参考.就我而言,我正在寻找音乐的 videoCategoryId....

                  I've been going through their documentation for an hour and can't seem to find any reference to how I find out what the various category's ids are. In my case I'm looking for the videoCategoryId for music....

                  推荐答案

                  视频类别是特定于区域的——这就是类别列表服务需要类别 ID 或区域,但不能同时需要两者的原因.此端点:

                  Video categories are region specific -- that's why the category list service requires either a category ID or a region, but not both. This endpoint:

                  https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&regionCode={two-character-region}&key={YOUR_API_KEY}

                  https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&regionCode={two-character-region}&key={YOUR_API_KEY}

                  将返回给定区域的所有类别及其 ID.因此,正如 Ikai Lan 在评论中指出的那样,音乐的 ID 在美国是10",事实上,在所有允许此类别的地区;但可能有些地区不允许,或者有些地区根本不支持.

                  will return all categories, along with their ids, for a given region. So as Ikai Lan pointed out in the comments, the ID for music is '10' in the US and, in fact, in all regions where this category is allowed; but there may be some regions where it isn't allowed, or some regions that aren't supported at all.

                  这篇关于YouTube API V3:在哪里可以找到每个“videoCategoryId"的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Gmail API:尝试发送电子邮件时出现 400 个错误请求(PHP 代码) 下一篇:我想在 php 中找到用户的当前位置

                  相关文章

                  1. <small id='znv0T'></small><noframes id='znv0T'>

                  2. <legend id='znv0T'><style id='znv0T'><dir id='znv0T'><q id='znv0T'></q></dir></style></legend>

                      <bdo id='znv0T'></bdo><ul id='znv0T'></ul>
                    <tfoot id='znv0T'></tfoot>

                    1. <i id='znv0T'><tr id='znv0T'><dt id='znv0T'><q id='znv0T'><span id='znv0T'><b id='znv0T'><form id='znv0T'><ins id='znv0T'></ins><ul id='znv0T'></ul><sub id='znv0T'></sub></form><legend id='znv0T'></legend><bdo id='znv0T'><pre id='znv0T'><center id='znv0T'></center></pre></bdo></b><th id='znv0T'></th></span></q></dt></tr></i><div id='znv0T'><tfoot id='znv0T'></tfoot><dl id='znv0T'><fieldset id='znv0T'></fieldset></dl></div>