protected override void Execute() { string email = this.emailField.Value; string from = this.fromField.Value; string secret = this.secretField.Value; APIConnector apiConnector = this.CreateConnector(from, secret); string id = apiConnector.LookupEmail(email); if (id != null) { System.Console.WriteLine(id); } }
/// <summary> /// Wrapper to id lookup via email <see cref="Threema.MsgApi.APIConnector.LookupEmail"/> /// </summary> /// <param name="email">Email for lookup</param> /// <param name="from">Sender id</param> /// <param name="secret">Sender secret</param> /// <param name="apiUrl">Optional api url</param> /// <returns>id</returns> public string LookupEmail(string email, string from, string secret, string apiUrl = APIConnector.DEFAULTAPIURL) { APIConnector apiConnector = this.CreateConnector(from, secret, apiUrl); return(apiConnector.LookupEmail(email)); }