VkNet.Categories.AccountCategory.SaveProfileInfo C# (CSharp) Method

SaveProfileInfo() public method

Редактирует информацию текущего профиля.
Страница документации ВКонтакте http://vk.com/dev/account.saveProfileInfo.
public SaveProfileInfo ( ChangeNameRequest &changeNameRequest, AccountSaveProfileInfoParams @params ) : bool
changeNameRequest ChangeNameRequest Если в параметрах передавалось имя или фамилия пользователя, /// в этом параметре будет возвращен объект типа , содержащий информацию о заявке на смену имени.
@params AccountSaveProfileInfoParams
return bool
        public bool SaveProfileInfo(out ChangeNameRequest changeNameRequest, AccountSaveProfileInfoParams @params)
        {
            var response = _vk.Call("account.saveProfileInfo", @params);

            changeNameRequest = null;

            if (response.ContainsKey("name_request"))
            {
                changeNameRequest = response["name_request"];
            }

            return response["changed"];
        }

Same methods

AccountCategory::SaveProfileInfo ( ChangeNameRequest &changeNameRequest, string firstName = null, string lastName = null, string maidenName = null, Sex sex = null, RelationType relation = null, long relationPartnerId = null, System.DateTime birthDate = null, BirthdayVisibility birthDateVisibility = null, string homeTown = null, long countryId = null, long cityId = null ) : bool
AccountCategory::SaveProfileInfo ( int cancelRequestId ) : bool
AccountCategory::SaveProfileInfo ( string firstName = null, string lastName = null, string maidenName = null, Sex sex = null, RelationType relation = null, long relationPartnerId = null, System.DateTime birthDate = null, BirthdayVisibility birthDateVisibility = null, string homeTown = null, long countryId = null, long cityId = null ) : bool

Usage Example

Example #1
0
 public void SaveProfileInfo_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var account = new AccountCategory(new VkApi());
     ChangeNameRequest request;
     Assert.That(() => account.SaveProfileInfo(firstName: null), Throws.InstanceOf<AccessTokenInvalidException>());
     Assert.That(() => account.SaveProfileInfo(out request), Throws.InstanceOf<AccessTokenInvalidException>());
     Assert.That(() => account.SaveProfileInfo(10), Throws.InstanceOf<AccessTokenInvalidException>());
 }