private ArgSendMessageJson getMessageForEcho() { var args = new ArgSendMessageJson(); args.text = "message received"; return(args); }
private async Task <MessageJson> SendMessage(ArgSendMessageJson data) { var request = new RestRequest("sendMessage", DataFormat.Json); request.AddJsonBody(data); var response = await client.PostAsync <ResponseJson <MessageJson> > (request); return(response.result ?? new MessageJson()); }
private ArgSendMessageJson getMessageForRequestLocation() { var buttonLocation = new KeyboardButtonJson(); buttonLocation.text = "Send location"; buttonLocation.request_location = true; var args = new ArgSendMessageJson(); args.text = "Please, send your location for take Weather"; args.reply_markup = new ReplyMarkupJson(); args.reply_markup.keyboard = new List <List <KeyboardButtonJson> > () { new List <KeyboardButtonJson> () { buttonLocation } }; return(args); }