示例#1
0
        private ArgSendMessageJson getMessageForEcho()
        {
            var args = new ArgSendMessageJson();

            args.text = "message received";
            return(args);
        }
示例#2
0
        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());
        }
示例#3
0
        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);
        }