Параметры метода groups.editManager
        /// <summary>
        /// Привести к типу VkParameters.
        /// </summary>
        /// <param name="p"> Параметры. </param>
        /// <returns> </returns>
        public static VkParameters ToVkParameters(GroupsEditManagerParams p)
        {
            var parameters = new VkParameters
            {
                { "group_id", p.GroupId }
                , { "user_id", p.UserId }
                , { "role", p.Role }
                , { "is_contact", p.IsContact }
                , { "contact_position", p.ContactPosition }
                , { "contact_phone", p.ContactPhone }
                , { "contact_email", p.ContactEmail }
            };

            return(parameters);
        }
Exemplo n.º 2
0
		/// <summary>
		/// Привести к типу VkParameters.
		/// </summary>
		/// <param name="p">Параметры.</param>
		/// <returns></returns>
		internal static VkParameters ToVkParameters(GroupsEditManagerParams p)
		{
			var parameters = new VkParameters
			{
				{ "group_id", p.GroupId },
				{ "user_id", p.UserId },
				{ "role", p.Role },
				{ "is_contact", p.IsContact },
				{ "contact_position", p.ContactPosition },
				{ "contact_phone", p.ContactPhone },
				{ "contact_email", p.ContactEmail }
			};

			return parameters;
		}
Exemplo n.º 3
0
        public bool EditManager(long groupId, long userId, AdminLevel? role, bool? isContact = null, string contactPosition = null, string contactPhone = null, string contactEmail = null)
        {
            VkErrors.ThrowIfNumberIsNegative(() => groupId);
            VkErrors.ThrowIfNumberIsNegative(() => userId);
            var parameters = new GroupsEditManagerParams
            {
                GroupId = groupId,
                UserId = userId,
                ContactEmail = contactEmail,
                ContactPhone = contactPhone,
                ContactPosition = contactPosition,
                IsContact = isContact,
                Role = role
            };

            return EditManager(parameters);
        }