예제 #1
0
파일: BoardCategory.cs 프로젝트: kadkin/vk
 public TopicsFeed GetComments(BoardGetCommentsParams @params, bool skipAuthorization = true)
 {
     var response = _vk.Call("board.getComments", @params, skipAuthorization);
     var result = new TopicsFeed
     {
         Count = response["count"],
         Items = response["items"].ToReadOnlyCollectionOf<Comment>(x => x),
         Profiles = response["profiles"].ToReadOnlyCollectionOf<User>(x => x),
         Groups = response["groups"].ToReadOnlyCollectionOf<Group>(x => x)
     };
     return result;
 }
예제 #2
0
        public TopicsFeed GetComments(BoardGetCommentsParams @params, bool skipAuthorization = false)
        {
            var response = _vk.Call("board.getComments", @params, skipAuthorization);
            var result   = new TopicsFeed
            {
                Count    = response["count"],
                Items    = response["items"].ToReadOnlyCollectionOf <Comment>(x => x),
                Profiles = response["profiles"].ToReadOnlyCollectionOf <User>(x => x),
                Groups   = response["groups"].ToReadOnlyCollectionOf <Group>(x => x)
            };

            return(result);
        }
예제 #3
0
        /// <summary>
        /// Возвращает список сообщений в указанной теме.
        /// </summary>
        /// <param name="params"> Входные параметры выборки. </param>
        /// <param name="skipAuthorization"> Если <c> true </c> то пропустить авторизацию. </param>
        /// <returns>
        /// </returns>
        /// <remarks>
        /// Страница документации ВКонтакте
        /// <see href="https://new.vk.com/dev/board.getComments" />.
        /// </remarks>
        public TopicsFeed GetComments(BoardGetCommentsParams @params, bool skipAuthorization = false)
        {
            var response = _vk.Call(methodName: "board.getComments", parameters: @params, skipAuthorization: skipAuthorization);

            var result = new TopicsFeed
            {
                Count      = response[key : "count"]
                , Items    = response[key : "items"].ToReadOnlyCollectionOf <CommentBoard>(selector : x => x)
                , Profiles = response[key : "profiles"].ToReadOnlyCollectionOf <User>(selector : x => x)
                , Groups   = response[key : "groups"].ToReadOnlyCollectionOf <Group>(selector : x => x)
            };

            return(result);
        }