VK API是否支持按文件类型搜索? [英] Does VK API support a search by file type?

查看:187
本文介绍了VK API是否支持按文件类型搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我浏览到一个vk社区,并且希望能够检索上载到该社区的所有gif文件,我将如何处理?

解决方案

您可以使用方法 docs.get

通过链接访问

https://api.vk.com/method/docs .get.xml?owner_id =- GROUP_ID & access_token = YOUR_ACCESS_TOKEN

阅读这是我的答案了解更多信息,如果您没有 acess_token

结果是您将看到一个xml格式的文档. (如果您想使用json-response-format,只需从您正在访问的链接中删除" .xml ")

文档将包含所有文档数和每个文档的信息,例如 document_id,其标题和大小扩展名 url .

请注意,如果您从社区(而不是从用户)访问nig文档,则链接中的owner_id必须为负,它必须在community_id之前包含-

要了解社区ID,您可以阅读我的另一篇文章

如果您什么都不懂,请随时提出任何问题:)

Say I browse to a vk community and would like to be able to retrieve all of the gifs uploaded to that community, How would I go about this?

解决方案

You can use method docs.get

Access it by link

https://api.vk.com/method/docs.get.xml?owner_id=-GROUP_ID&access_token=YOUR_ACCESS_TOKEN

Read this my answer to know a bit more if you do not have an acess_token

In result you will see a document with xml-format. (if you want to use json-response-format just remove ".xml" from link you're accessing)

Document will contatin all doc-count and information about each of them like document_id, its title and size, extension and url.

Note that if you accessnig documents from community (not from user) your owner_id in the link must be negative, it must contain - before community_id

To know community id you can read another my post

Feel free to ask any questions if you didn't understand anything :)

这篇关于VK API是否支持按文件类型搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆