Список параметров для метода photos.getUserPhotos
예제 #1
0
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p">Параметры.</param>
        /// <returns></returns>
        public static VkParameters ToVkParameters(PhotoGetUserPhotosParams p)
        {
            var parameters = new VkParameters
            {
                { "user_id", p.UserId },
                { "count", p.Count },
                { "offset", p.Offset },
                { "extended", p.Extended },
                { "sort", p.Sort }
            };

            return(parameters);
        }
예제 #2
0
		/// <summary>
		/// Привести к типу VkParameters.
		/// </summary>
		/// <param name="p">Параметры.</param>
		/// <returns></returns>
		internal static VkParameters ToVkParameters(PhotoGetUserPhotosParams p)
		{
			var parameters = new VkParameters
			{
				{ "user_id", p.UserId },
				{ "count", p.Count },
				{ "offset", p.Offset },
				{ "extended", p.Extended },
				{ "sort", p.Sort }
			};

			return parameters;
		}
예제 #3
0
		public ReadOnlyCollection<Photo> GetUserPhotos(out int count, PhotoGetUserPhotosParams @params)
		{
			var response = GetUserPhotos(@params);

			count = Convert.ToInt32(response.TotalCount);

			return response.ToReadOnlyCollection();
		}
예제 #4
0
 public ReadOnlyCollection<Photo> GetUserPhotos(out int count, PhotoGetUserPhotosParams @params)
 {
     var response = _vk.Call("photos.getUserPhotos", @params);
     count = response["count"];
     return response["items"].ToReadOnlyCollectionOf<Photo>(x => x);
 }