/// <summary> /// Привести к типу VkParameters. /// </summary> /// <param name="p"> Параметры. </param> /// <returns> </returns> public static VkParameters ToVkParameters(NewsFeedGetCommentsParams p) { var parameters = new VkParameters { { "count", p.Count } , { "filters", p.Filters } , { "reposts", p.Reposts } , { "start_time", p.StartTime } , { "end_time", p.EndTime } , { "last_comments_count", p.LastCommentsCount } , { "start_from", p.StartFrom } , { "fields", p.Fields } }; return(parameters); }
/// <summary> /// Привести к типу VkParameters. /// </summary> /// <param name="p">Параметры.</param> /// <returns></returns> internal static VkParameters ToVkParameters(NewsFeedGetCommentsParams p) { var parameters = new VkParameters { { "count", p.Count }, { "filters", p.Filters }, { "reposts", p.Reposts }, { "start_time", p.StartTime }, { "end_time", p.EndTime }, { "last_comments_count", p.LastCommentsCount }, { "start_from", p.StartFrom }, { "fields", p.Fields } }; return parameters; }
public NewsFeed GetComments(NewsFeedGetCommentsParams @params) { var response = _vk.Call("newsfeed.getComments", @params); var result = new NewsFeed { Items = response["items"].ToReadOnlyCollectionOf<NewsItem>(x => x), Profiles = response["profiles"].ToReadOnlyCollectionOf<User>(x => x), Groups = response["groups"].ToReadOnlyCollectionOf<Group>(x => x), NewOffset = response["new_offset"], NextFrom = response["next_from"] }; return result; }