public getUpdates getMessages() { var request = new RestRequest("getUpdates", Method.GET); IRestResponse response = client.Execute(request); getUpdates o = JsonConvert.DeserializeObject <getUpdates>(response.Content); return(o); }
public getUpdates getMessagesWithOffset(int offsetValue) { var request = new RestRequest("getUpdates?offset=" + offsetValue, Method.GET); IRestResponse response = client.Execute(request); getUpdates o = JsonConvert.DeserializeObject <getUpdates>(response.Content); return(o); }
private void btnTest_Click(object sender, EventArgs e) { TelegramHelper tele = new TelegramHelper("472134659:AAGBdeNQki_tz5LxL-KW9904ckM78kQkNTM"); getUpdates lst = tele.getMessages(); foreach (result rs in lst.result) { MessageBox.Show(rs.message.from.id.ToString()); } }