Add new account methods

This commit is contained in:
Roj Serbest 2021-10-16 17:12:24 +03:00
parent 906391bfb6
commit bf48a4aeb0
1 changed files with 25 additions and 0 deletions

View File

@ -78,4 +78,29 @@ export class Account extends MethodBase {
true,
);
}
/**
* Updates the profile name of the currently logged in account.
*/
updateProfileName(firstName: string, lastName?: string): Promise<boolean> {
return this.client.invokeRequest(
new Request("account.update_profile_name", {
first_name: firstName,
last_name: lastName,
}),
true,
);
}
/**
* Updates the profile name of the currently logged in account.
*/
updateProfileURL(url: string): Promise<boolean> {
return this.client.invokeRequest(
new Request("account.update_profile_url", {
url,
}),
true,
);
}
}