Example #1
0
        public bool SaveProfileInfo(out ChangeNameRequest changeNameRequest, AccountSaveInfoParams @params)
        {
            VkErrors.ThrowIfNumberIsNegative(() => @params.RelationPartnerId);
            VkErrors.ThrowIfNumberIsNegative(() => @params.CountryId);
            VkErrors.ThrowIfNumberIsNegative(() => @params.CityId);

            var response = _vk.Call("account.saveProfileInfo", @params);

            changeNameRequest = response["name_request"];
            return(response["changed"]);
        }
Example #2
0
        public bool SaveProfileInfo(out ChangeNameRequest changeNameRequest, string firstName = null, string lastName = null, string maidenName = null, Sex?sex    = null,
                                    RelationType?relation = null, long?relationPartnerId = null, DateTime?birthDate = null, BirthdayVisibility?birthDateVisibility = null,
                                    string homeTown       = null, long?countryId = null, long?cityId = null)
        {
            var parameters = new AccountSaveInfoParams
            {
                FirstName           = firstName,
                LastName            = lastName,
                MaidenName          = maidenName,
                Sex                 = sex.Value,
                Relation            = relation.Value,
                RelationPartnerId   = relationPartnerId,
                BirthDate           = birthDate,
                BirthDateVisibility = birthDateVisibility.Value,
                HomeTown            = homeTown,
                CountryId           = countryId,
                CityId              = cityId
            };

            return(SaveProfileInfo(out changeNameRequest, parameters));
        }
Example #3
0
		public bool SaveProfileInfo(out ChangeNameRequest changeNameRequest, AccountSaveInfoParams @params)
		{
			VkErrors.ThrowIfNumberIsNegative(() => @params.RelationPartnerId);
			VkErrors.ThrowIfNumberIsNegative(() => @params.CountryId);
			VkErrors.ThrowIfNumberIsNegative(() => @params.CityId);

			var response = _vk.Call("account.saveProfileInfo", @params);

			changeNameRequest = response["name_request"];
			return response["changed"];
		}
Example #4
0
		public bool SaveProfileInfo(out ChangeNameRequest changeNameRequest, string firstName = null, string lastName = null, string maidenName = null, Sex? sex = null,
			RelationType? relation = null, long? relationPartnerId = null, DateTime? birthDate = null, BirthdayVisibility? birthDateVisibility = null,
			string homeTown = null, long? countryId = null, long? cityId = null)
		{
			var parameters = new AccountSaveInfoParams
			{
				FirstName = firstName,
				LastName = lastName,
				MaidenName = maidenName,
				Sex = sex.Value,
				Relation = relation.Value,
				RelationPartnerId = relationPartnerId,
				BirthDate = birthDate,
				BirthDateVisibility = birthDateVisibility.Value,
				HomeTown = homeTown,
				CountryId = countryId,
				CityId = cityId
			};

			return SaveProfileInfo(out changeNameRequest, parameters);

		}