public VideoCorpMessage(string mediaId, string title, string description)
            : base(MessageType.Video)
        {
            TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null);

            Video = new VideoServiceMediaType
            {
                MediaId = mediaId,
                Title = title,
                Description = description
            };
        }
Exemple #2
0
        public VideoServiceMessage(string toUser, string mediaId, string title, string description)
            : base(toUser, MessageType.Video)
        {
            TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null);

            Video = new VideoServiceMediaType
            {
                MediaId     = mediaId,
                Title       = title,
                Description = description
            };
        }
Exemple #3
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);
        }
Exemple #4
0
        public UserVideoMassMessage(IEnumerable <string> users, string title,
                                    string description, string mediaId)
            : base(users)
        {
            TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null);

            MediaId = new VideoServiceMediaType
            {
                MediaId     = mediaId,
                Title       = title,
                Description = description
            };
            MsgType = MessageType.MpVideo;
        }
        public UserVideoMassMessage(IEnumerable<string> users, string title,
            string description, string mediaId)
            : base(users)
        {
            TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null);

            MediaId = new VideoServiceMediaType
            {
                MediaId = mediaId,
                Title = title,
                Description = description
            };
            MsgType = MessageType.MpVideo;
        }
Exemple #6
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);
        }
        public GroupVideoMassMessage(int groupId, string title,
            string description, string mediaId)
            : base(groupId)
        {
            TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null);

            MediaId = new VideoServiceMediaType
            {
                MediaId = mediaId,
                Title = title,
                Description = description
            };
            MsgType = MessageType.MpVideo;
        }
Exemple #8
0
        public GroupVideoMassMessage(int groupId, string title,
                                     string description, string mediaId)
            : base(groupId)
        {
            TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null);

            MediaId = new VideoServiceMediaType
            {
                MediaId     = mediaId,
                Title       = title,
                Description = description
            };
            MsgType = MessageType.MpVideo;
        }