讀古今文學網 > 微信公眾平台開發:從零基礎到ThinkPHP5高性能框架實踐 > 12.7 獲取素材總數 >

12.7 獲取素材總數

開發者可以根據本接口獲取永久素材的列表,需要時也可保存到本地。

獲取素材總數的接口如下。


https:// api.weixin.qq.com/cgi-bin/material/get_materialcount?access_token=ACCESS_TOKEN
  

正確創建時,返回的數據示例如下。


{
    "voice_count":123,
    "video_count":34,
    "image_count":384,
    "news_count":22
}
  

上述數據的參數說明如表12-9所示。

表12-9 獲取素材總數接口返回的參數說明