【问题标题】:Blogger API Search using Labels使用标签的 Blogger API 搜索
【发布时间】:2017-01-25 16:03:29
【问题描述】:

我一直在通过 Perl 搜索我的博客

 my $url = "https://www.googleapis.com/blogger/v3/blogs/"
     . BLOG_ID . "/posts/search?q=" . $searchTerm
    . "&key=" . API_KEY . "&maxResults=9999";
 my $json_data = geturl($url);

通常,我会取回我想要的帖子组,另外还有一两个我可以解析出来的帖子。

但是现在,我的搜索返回了 10 个帖子,但我都不想要,因为我的搜索词似乎太笼统了。

当我使用网络界面时,我可以按标签搜索/过滤,这是我想做的。但是在我的 $url 中添加“&labels=$searchTerm”并没有什么不同。

有没有什么方法可以通过 $url 返回的标签或标题过滤搜索结果?

我似乎被限制为 10 个帖子,即使使用“maxResults”也是如此。

感谢任何和所有的帮助。

【问题讨论】:

    标签: blogger


    【解决方案1】:

    或者,您可以使用公开可用的提要按标签过滤帖子 -

    https://blog.name/feeds/posts/default/-/LabelToFilterBy?max-results=20&alt=json
    

    一个活生生的例子 -

    https://developers.googleblog.com/feeds/posts/default/-/android?max-results=50&alt=json

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-05-24
      • 2018-10-13
      • 1970-01-01
      • 1970-01-01
      • 2012-12-07
      • 1970-01-01
      • 2012-10-21
      相关资源
      最近更新 更多