/// <summary>
 /// 下载临时素材(多媒体文件)
 /// </summary>
 /// <param name="userName">公众号</param>
 /// <param name="mediaId">媒体ID</param>
 /// <param name="data">返回下载是否成功</param>
 /// <returns>返回多媒体文件数据;如果下载失败,返回null。</returns>
 public static byte[] Download(string userName, string mediaId, out ErrorMessage errorMessage)
 {
     return(MultiMediaHelper.Download(userName, mediaId, out errorMessage));
 }
 /// <summary>
 /// 获取下载临时素材(媒体文件,不包括视频)的链接
 /// </summary>
 /// <param name="token">许可令牌</param>
 /// <param name="mediaId">媒体id</param>
 /// <returns>返回下载多媒体文件的链接</returns>
 public static string GetDownloadUrlOfTemporary(string token, string mediaId)
 {
     return(MultiMediaHelper.GetDownloadUrl(token, mediaId));
 }
 /// <summary>
 /// 新增临时素材(多媒体文件)
 /// </summary>
 /// <param name="userName">公众号</param>
 /// <param name="type">媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)</param>
 /// <param name="fileName">文件名(不包含路径)</param>
 /// <param name="data">数据</param>
 /// <param name="errorMessage">返回上传是否成功</param>
 /// <returns>返回上传多媒体文件的结果;如果上传失败,返回null。</returns>
 public static MultiMediaUploadResult AddTemporary(string userName, MultiMediaTypeEnum type, string fileName, byte[] data, out ErrorMessage errorMessage)
 {
     return(MultiMediaHelper.Upload(userName, type, fileName, data, out errorMessage));
 }
 /// <summary>
 /// 新增临时素材(图文消息)
 /// </summary>
 /// <param name="userName">公众号</param>
 /// <param name="articles">图文消息</param>
 /// <param name="errorMessage">返回上传是否成功</param>
 /// <returns>返回上传图文消息的结果;如果上传失败,返回null。</returns>
 public static MultiMediaUploadResult AddTemporary(string userName, IEnumerable <MultiMediaArticle> articles, out ErrorMessage errorMessage)
 {
     return(MultiMediaHelper.Upload(userName, articles, out errorMessage));
 }
 /// <summary>
 /// 新增临时素材(多媒体文件)
 /// </summary>
 /// <param name="userName">公众号</param>
 /// <param name="type">媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)</param>
 /// <param name="pathName">包含路径的文件名</param>
 /// <param name="errorMessage">返回上传是否成功</param>
 /// <returns>返回多媒体上传结果;如果上传失败,返回null。</returns>
 public static MultiMediaUploadResult AddTemporary(string userName, MultiMediaTypeEnum type, string pathName, out ErrorMessage errorMessage)
 {
     return(MultiMediaHelper.Upload(userName, type, pathName, out errorMessage));
 }