public NewsFeed GetComments(GetCommentsParams @params) { var parameters = new VkParameters { { "count", @params.Count }, { "filters", @params.Filters }, { "reposts", @params.Reposts }, { "start_time", @params.StartTime }, { "end_time", @params.EndTime }, { "last_comments_count", @params.LastCommentsCount }, { "start_from", @params.StartFrom }, { "fields", @params.Fields } }; var response = _vk.Call("newsfeed.getComments", parameters); 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); }
/// <inheritdoc /> public VkCollection <Comment> GetComments(GetCommentsParams getCommentsParams) { return(_vk.Call <VkCollection <Comment> >("widgets.getComments" , getCommentsParams , false , new VkCollectionJsonConverter(collectionField: "posts"))); }
/// <inheritdoc /> public Task <VkCollection <Comment> > GetCommentsAsync(GetCommentsParams getComments) { return(TypeHelper.TryInvokeMethodAsync(func: () => GetComments(getCommentsParams: getComments))); }
/// <inheritdoc /> public async Task <VkCollection <Comment> > GetCommentsAsync(GetCommentsParams getComments) { return(await TypeHelper.TryInvokeMethodAsync(func : () => _vk.Widgets.GetComments(getCommentsParams: getComments))); }
public NewsFeed GetComments(GetCommentsParams @params) { var parameters = new VkParameters { { "count", @params.Count }, { "filters", @params.Filters }, { "reposts", @params.Reposts }, { "start_time", @params.StartTime }, { "end_time", @params.EndTime }, { "last_comments_count", @params.LastCommentsCount }, { "start_from", @params.StartFrom }, { "fields", @params.Fields } }; var response = _vk.Call("newsfeed.getComments", parameters); 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; }