示例#1
0
        public static MediaId InternalUploadVideo(string title, string description, string media)
        {
            var videoMedia = new VideoServiceMediaType
            {
                MediaId     = media,
                Title       = title,
                Description = description
            };
            string url     = WeUtil.GetUrl(WeConst.VIDEO_MASS_URL);
            var    mediaId = WeUtil.PostToUri(url, videoMedia.WriteJson(), new MediaId());

            return(mediaId);
        }
示例#2
0
        private static MediaId UploadVideo(string title, string description, string path)
        {
            var mediaId    = UploadMedia(MediaType.Video, path);
            var videoMedia = new VideoServiceMediaType
            {
                MediaId     = mediaId.Id,
                Title       = title,
                Description = description
            };
            string url = WeUtil.GetUrl(WeConst.VIDEO_MASS_URL);

            mediaId = WeUtil.PostToUri(url, videoMedia.WriteJson(), new MediaId());
            return(mediaId);
        }