Does VK API support a search by file type?

落花浮王杯 提交于 2020-01-25 12:49:05

问题


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?


回答1:


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 :)



来源:https://stackoverflow.com/questions/32320591/does-vk-api-support-a-search-by-file-type

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!