Список параметров для метода photos.search
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p"> Параметры. </param>
        /// <returns> </returns>
        public static VkParameters ToVkParameters(PhotoSearchParams p)
        {
            var parameters = new VkParameters
            {
                { "q", p.Query }
                , { "lat", p.Latitude }
                , { "long", p.Longitude }
                , { "start_time", p.StartTime }
                , { "end_time", p.EndTime }
                , { "sort", p.Sort }
                , { "offset", p.Offset }
                , { "count", p.Count }
                , { "radius", p.Radius }
            };

            return(parameters);
        }
示例#2
0
		/// <summary>
		/// Привести к типу VkParameters.
		/// </summary>
		/// <param name="p">Параметры.</param>
		/// <returns></returns>
		internal static VkParameters ToVkParameters(PhotoSearchParams p)
		{
			var parameters = new VkParameters
			{
				{ "q", HttpUtility.UrlEncode(p.Query) },
				{ "lat", p.Latitude },
				{ "long", p.Longitude },
				{ "start_time", p.StartTime },
				{ "end_time", p.EndTime },
				{ "sort", p.Sort },
				{ "offset", p.Offset },
				{ "count", p.Count },
				{ "radius", p.Radius }
			};

			return parameters;
		}
示例#3
0
		public ReadOnlyCollection<Photo> Search(out int count, PhotoSearchParams @params)
		{
			var response = Search(@params);

			count = Convert.ToInt32(response.TotalCount);

			return response.ToReadOnlyCollection();
		}
示例#4
0
 public ReadOnlyCollection<Photo> Search(out int count,PhotoSearchParams @params)
 {
     var response = _vk.Call("photos.search", @params, true);
     count = response["count"];
     return response["items"].ToReadOnlyCollectionOf<Photo>(x => x);
 }