Example #1
0
        public void Start()
        {
            _client        = new Td.Client();
            _hub           = new Hub(_client);
            _hub.Received += Hub_Received;
            _thread        = new Thread(() =>
            {
                _hub.Start();
            });
            _thread.Start();

            _dialer = new Dialer(_client, _hub);
        }
 /// <summary>
 /// Returns a Telegram Passport authorization form for sharing data with a service
 /// </summary>
 public static Task <PassportAuthorizationForm> GetPassportAuthorizationFormAsync(this Client client,
                                                                                  int botUserId    = default(int),
                                                                                  string scope     = default(string),
                                                                                  string publicKey = default(string),
                                                                                  string nonce     = default(string))
 {
     return(client.ExecuteAsync(new GetPassportAuthorizationForm
     {
         BotUserId = botUserId,
         Scope = scope,
         PublicKey = publicKey,
         Nonce = nonce,
     }));
 }