public NewsFeed GetRecommended(NewsFeedGetRecommendedParams @params) { var response = _vk.Call("newsfeed.getRecommended", @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; }
public NewsFeed GetRecommended(GetRecommendedParams @params) { var parameters = new VkParameters { { "start_time", @params.StartTime }, { "end_time", @params.EndTime }, { "max_photos", @params.MaxPhotos }, { "start_from", @params.StartFrom }, { "count", @params.Count }, { "fields", @params.Fields } }; var response = _vk.Call("newsfeed.getRecommended", 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; }