Список параметров запроса newsfeed.get
Beispiel #1
0
		public NewsFeed Get(NewsFeedGetParams @params)
		{
			var response = _vk.Call("newsfeed.get", @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;
		}
Beispiel #2
0
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p"> Параметры. </param>
        /// <returns> </returns>
        public static VkParameters ToVkParameters(NewsFeedGetParams p)
        {
            var parameters = new VkParameters
            {
                { "filters", p.Filters }
                , { "return_banned", p.ReturnBanned }
                , { "start_time", p.StartTime }
                , { "end_time", p.EndTime }
                , { "max_photos", p.MaxPhotos }
                , { "source_ids", p.SourceIds }
                , { "start_from", p.StartFrom }
                , { "count", p.Count }
                , { "fields", p.Fields }
            };

            return(parameters);
        }
Beispiel #3
0
		/// <summary>
		/// Привести к типу VkParameters.
		/// </summary>
		/// <param name="p">Параметры.</param>
		/// <returns></returns>
		internal static VkParameters ToVkParameters(NewsFeedGetParams p)
		{
			var parameters = new VkParameters
			{
				{ "filters", p.Filters },
				{ "return_banned", p.ReturnBanned },
				{ "start_time", p.StartTime },
				{ "end_time", p.EndTime },
				{ "max_photos", p.MaxPhotos },
				{ "source_ids", p.SourceIds },
				{ "start_from", p.StartFrom },
				{ "count", p.Count },
				{ "fields", p.Fields }
			};

			return parameters;
		}