Параметры метода groups.search
Exemplo n.º 1
0
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p">Параметры.</param>
        /// <returns></returns>
        internal static VkParameters ToVkParameters(GroupsSearchParams p)
        {
            var parameters = new VkParameters
            {
                { "q", p.Query },
                { "type", p.Type },
                { "country_id", p.CountryId },
                { "city_id", p.CityId },
                { "future", p.Future },
                { "sort", p.Sort },
                { "offset", p.Offset },
                { "count", p.Count }
            };

            return(parameters);
        }
Exemplo n.º 2
0
		/// <summary>
		/// Привести к типу VkParameters.
		/// </summary>
		/// <param name="p">Параметры.</param>
		/// <returns></returns>
		internal static VkParameters ToVkParameters(GroupsSearchParams p)
		{
			var parameters = new VkParameters
			{
				{ "q", p.Query },
				{ "type", p.Type },
				{ "country_id", p.CountryId },
				{ "city_id", p.CityId },
				{ "future", p.Future },
				{ "sort", p.Sort },
				{ "offset", p.Offset },
				{ "count", p.Count }
			};

			return parameters;
		}
Exemplo n.º 3
0
        public ReadOnlyCollection<Group> Search(out int totalCount, GroupsSearchParams @params)
        {
            var response = Search(@params);

            totalCount = Convert.ToInt32(response.TotalCount);

            return response.ToReadOnlyCollection();
        }
Exemplo n.º 4
0
        public ReadOnlyCollection<Group> Search([NotNull] string query, out int totalCount, uint? offset = null, uint? count = null, GroupSort sort = GroupSort.Normal, GroupType type = null, uint? countryId = null, uint? cityId = null, bool future = false)
        {
            VkErrors.ThrowIfNullOrEmpty(() => query);

            var parameters = new GroupsSearchParams
            {
                Query = query,
                Sort = sort,
                Count = count,
                Offset = offset,
                Type = type,
                CityId = cityId,
                CountryId = countryId,
                Future = future
            };
            var result = Search(parameters);

            totalCount = Convert.ToInt32(result.TotalCount);

            return result.ToReadOnlyCollection();
        }