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

GetProfileInfo() private method

private GetProfileInfo ( ) : AccountSaveProfileInfoParams
return AccountSaveProfileInfoParams
        public AccountSaveProfileInfoParams GetProfileInfo()
        {
            User user = _vk.Call("account.getProfileInfo", VkParameters.Empty);
            return new AccountSaveProfileInfoParams
            {
                City = user.City,
                Country = user.Country,
                BirthDate = user.BirthDate,
                BirthdayVisibility = user.BirthdayVisibility,
                FirstName = user.FirstName,
                LastName = user.LastName,
                HomeTown = user.HomeTown,
                MaidenName = user.MaidenName,
                Relation = user.Relation,
                Sex = user.Sex,
                RelationPartner = user.RelationPartner,
                ScreenName = user.ScreenName,
                Status = user.Status,
                Phone = user.MobilePhone
            };
        }

Usage Example

Example #1
0
 public void GetProfileInfo_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var account = new AccountCategory(new VkApi());
     This.Action(() => account.GetProfileInfo()).Throws<AccessTokenInvalidException>();
 }
All Usage Examples Of VkNet.Categories.AccountCategory::GetProfileInfo