wx4j-MaterialUtils的使用
函數說明:上傳永久視頻素材
參數:文件路徑、視頻描述(通過setter填充內容即可)
返回值:微信服務器返回的json字符串
public static String addPerpetualVideoMaterial(String filePath, VideoDescription description)
函數說明:上傳永久圖文素材
參數:構造圖文素材對象
返回值:微信服務器返回的json字符串
public static String addPerpetualNewsMaterials(NewsMaterials newsMaterials)
函數說明:上傳永久圖片素材
參數:圖片路徑
返回值:微信服務器返回的json字符串
public static String uploadImageMaterial(String filePath)
函數說明:上傳臨時素材
參數:文件類型、文件路徑
返回值:微信服務器返回的json字符串
public static String addTempMaterial(String type, String filePath)
函數說明:刪除永久素材
參數:素材media_id
返回值:微信服務器返回的json字符串
public String removePerpetualMaterial(String mediaId)