private GetProfileInfo ( ) : AccountSaveProfileInfoParams | ||
Résultat | 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
};
}
public void GetProfileInfo_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var account = new AccountCategory(new VkApi()); This.Action(() => account.GetProfileInfo()).Throws<AccessTokenInvalidException>(); }