Параметры метода video.getComments
Пример #1
0
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p">Параметры.</param>
        /// <returns></returns>
        public static VkParameters ToVkParameters(VideoGetCommentsParams p)
        {
            var parameters = new VkParameters
            {
                { "owner_id", p.OwnerId },
                { "video_id", p.VideoId },
                { "need_likes", p.NeedLikes },
                { "start_comment_id", p.StartCommentId },
                { "offset", p.Offset },
                { "count", p.Count },
                { "sort", p.Sort },
                { "extended", p.Extended }
            };

            return(parameters);
        }
Пример #2
0
        public ReadOnlyCollection<Comment> GetComments(VideoGetCommentsParams @params)
        {
            VkErrors.ThrowIfNumberIsNegative(() => @params.VideoId);
            VkErrors.ThrowIfNumberIsNegative(() => @params.Count);
            VkErrors.ThrowIfNumberIsNegative(() => @params.Offset);

            var response = _vk.Call("video.getComments", @params);

            return response.ToReadOnlyCollectionOf<Comment>(x => x);
        }
Пример #3
0
		public ReadOnlyCollection<Comment> GetComments(long videoId, long? ownerId = null, bool needLikes = false, int? count = null, int? offset = null, CommentsSort sort = null)
        {
			var parameters = new VideoGetCommentsParams
			{
				VideoId = videoId,
				OwnerId = ownerId,
				NeedLikes = needLikes,
				Count = count,
				Offset = offset,
				Sort = sort
			};
            return GetComments( parameters);
        }
Пример #4
0
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p">Параметры.</param>
        /// <returns></returns>
        internal static VkParameters ToVkParameters(VideoGetCommentsParams p)
        {
            var parameters = new VkParameters
            {
                { "owner_id", p.OwnerId },
                { "video_id", p.VideoId },
                { "need_likes", p.NeedLikes },
                { "start_comment_id", p.StartCommentId },
                { "offset", p.Offset },
                { "count", p.Count },
                { "sort", p.Sort },
                { "extended", p.Extended }
            };

            return parameters;
        }