Add methods for working with contacts. (#896)

Added methods for working with contacts:

* Import contact list
* Delete contact list
* Delete one contact
This commit is contained in:
CheshireCaat 2020-01-23 07:02:19 +03:00
parent e6672f4a98
commit 84b0f5fe1b

View file

@ -234,26 +234,6 @@ namespace TLSharp.Core
return (T)result;
}
public async Task<TLUser> UpdateUsernameAsync(string username)
{
if (!IsUserAuthorized())
throw new InvalidOperationException("Authorize user first!");
var req = new TLRequestUpdateUsername { Username = username };
return await SendRequestAsync<TLUser>(req);
}
public async Task<bool> CheckUsernameAsync(string username)
{
if (!IsUserAuthorized())
throw new InvalidOperationException("Authorize user first!");
var req = new TLRequestCheckUsername { Username = username };
return await SendRequestAsync<bool>(req);
}
public async Task<TLImportedContacts> ImportContactsAsync(IReadOnlyList<TLInputPhoneContact> contacts)
{
if (!IsUserAuthorized())