webdoc "only simple chat" for 4 more methods

This commit is contained in:
Wizou 2022-01-21 19:04:33 +01:00
parent f6e14c7499
commit 44ee933b03
3 changed files with 426 additions and 6 deletions

View file

@ -396,7 +396,7 @@ WTelegram.Helpers.Log = (lvl, str) => _logger.Log((LogLevel)lvl, str);
<a name="2FA"></a> <a name="2FA"></a>
### Change 2FA password ### Change 2FA password
```csharp ```csharp
const string old_password = "password"; // current password if any const string old_password = "password"; // current password if any (unused otherwise)
const string new_password = "new_password"; // or null to disable 2FA const string new_password = "new_password"; // or null to disable 2FA
var accountPassword = await client.Account_GetPassword(); var accountPassword = await client.Account_GetPassword();
var password = accountPassword.current_algo == null ? null : await WTelegram.Client.InputCheckPassword(accountPassword, old_password); var password = accountPassword.current_algo == null ? null : await WTelegram.Client.InputCheckPassword(accountPassword, old_password);
@ -408,7 +408,7 @@ await client.Account_UpdatePasswordSettings(password, new Account_PasswordInputS
new_password_hash = new_password_hash?.A, new_password_hash = new_password_hash?.A,
new_algo = accountPassword.new_algo, new_algo = accountPassword.new_algo,
hint = "new hint", hint = "new hint",
} });
``` ```
<a name="reaction"></a> <a name="reaction"></a>

View file

@ -302,11 +302,13 @@ namespace TL
{ {
nonce = nonce, nonce = nonce,
}); });
public static Task<ResPQ> ReqPqMulti(this Client client, Int128 nonce) public static Task<ResPQ> ReqPqMulti(this Client client, Int128 nonce)
=> client.InvokeBare(new ReqPqMulti => client.InvokeBare(new ReqPqMulti
{ {
nonce = nonce, nonce = nonce,
}); });
public static Task<ServerDHParams> ReqDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] p, byte[] q, long public_key_fingerprint, byte[] encrypted_data) public static Task<ServerDHParams> ReqDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] p, byte[] q, long public_key_fingerprint, byte[] encrypted_data)
=> client.InvokeBare(new ReqDHParams => client.InvokeBare(new ReqDHParams
{ {
@ -317,6 +319,7 @@ namespace TL
public_key_fingerprint = public_key_fingerprint, public_key_fingerprint = public_key_fingerprint,
encrypted_data = encrypted_data, encrypted_data = encrypted_data,
}); });
public static Task<SetClientDHParamsAnswer> SetClientDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] encrypted_data) public static Task<SetClientDHParamsAnswer> SetClientDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] encrypted_data)
=> client.InvokeBare(new SetClientDHParams => client.InvokeBare(new SetClientDHParams
{ {
@ -324,31 +327,37 @@ namespace TL
server_nonce = server_nonce, server_nonce = server_nonce,
encrypted_data = encrypted_data, encrypted_data = encrypted_data,
}); });
public static Task<DestroyAuthKeyRes> DestroyAuthKey(this Client client) public static Task<DestroyAuthKeyRes> DestroyAuthKey(this Client client)
=> client.InvokeBare(new DestroyAuthKey => client.InvokeBare(new DestroyAuthKey
{ {
}); });
public static Task<RpcDropAnswer> RpcDropAnswer(this Client client, long req_msg_id) public static Task<RpcDropAnswer> RpcDropAnswer(this Client client, long req_msg_id)
=> client.InvokeBare(new Methods.RpcDropAnswer => client.InvokeBare(new Methods.RpcDropAnswer
{ {
req_msg_id = req_msg_id, req_msg_id = req_msg_id,
}); });
public static Task<FutureSalts> GetFutureSalts(this Client client, int num) public static Task<FutureSalts> GetFutureSalts(this Client client, int num)
=> client.Invoke(new GetFutureSalts => client.Invoke(new GetFutureSalts
{ {
num = num, num = num,
}); });
public static Task<Pong> Ping(this Client client, long ping_id) public static Task<Pong> Ping(this Client client, long ping_id)
=> client.Invoke(new Ping => client.Invoke(new Ping
{ {
ping_id = ping_id, ping_id = ping_id,
}); });
public static Task<Pong> PingDelayDisconnect(this Client client, long ping_id, int disconnect_delay) public static Task<Pong> PingDelayDisconnect(this Client client, long ping_id, int disconnect_delay)
=> client.Invoke(new PingDelayDisconnect => client.Invoke(new PingDelayDisconnect
{ {
ping_id = ping_id, ping_id = ping_id,
disconnect_delay = disconnect_delay, disconnect_delay = disconnect_delay,
}); });
public static Task<DestroySessionRes> DestroySession(this Client client, long session_id) public static Task<DestroySessionRes> DestroySession(this Client client, long session_id)
=> client.InvokeBare(new DestroySession => client.InvokeBare(new DestroySession
{ {

File diff suppressed because it is too large Load diff