Пример #1
0
        public MemoryStream DownloadTempMedia(IWeChatOAContext context, string mediaId)
        {
            IDownloadTempMaterialApi api = new DownloadTempMaterialApi(context);

            api.MediaId = mediaId;
            return(api.Execute());
        }
Пример #2
0
        public void TestDownloadTempMediaApi()
        {
            IDownloadTempMaterialApi api = new DownloadTempMaterialApi(context);

            api.MediaId = "Pbc_POxTs2eJgUf_ry4NG92CN-7Mj99OtBLPC7v9CQW4mxh8DVDsKTCQiWGXSjeI";
            var stream = api.Execute();

            Assert.NotNull(stream);
            Assert.IsTrue(stream.Length > 0);
        }