Inspiration

What it does

How I built it

Temiloluwa Adeniyi

UGA Hacks 2019: Texcon

02/08/ 2019 - 02/10/2019

install.packages('devtools', dependencies=TRUE, repos='http://cran.rstudio.com/')

library(devtools)

devtools::install_github("Appsilon/shiny.collections", ref = "0.1.0")

install.packages('shiny', dependencies=TRUE, repos='http://cran.rstudio.com/')

library(shiny)

install.packages('twilio', dependencies=TRUE, repos='http://cran.rstudio.com/')

library(twilio)

install.packages('dplyr', dependencies=TRUE, repos='http://cran.rstudio.com/')

library(dplyr)

Define UI for application that draws a histogram

ui <- fluidPage(theme = shinytheme("superhero"),

            # Application title
            titlePanel("Teco"),

            # Sidebar with a slider input for number of bins 
            sidebarLayout(
              sidebarPanel(
                textInput(inputId     = "sid",             label = "SID Verification")
                , textInput(inputId     = "token",           label = "Token Verification")
                , numericInput(inputId  = "from_number",     label = "Customer Cell Number", value = 15135709118)
                , numericInput(inputId  = "to_number",       label = "Business Cell Number", value = 16787011761)
                , textInput(inputId     = "bitcoin sender",           label = "Bitcoin Sender Address", value = 'yghkUP37nXnEm9ZJs46Sm0L2rScuCaw2S6Hvff5yuRXRXZheUKxe477v6pfo9zfADyBNnhxQ86Lbtc')
                , textInput(inputId     = "bitcoin receiver",           label = "Bitcoin Receiver Address", value = 
                              '1JUiiLnG7KBgiSfop1DxcUc8iUGFUX2Dj')
                , textAreaInput(inputId = "message",         label = "Transaction Details")
                , actionButton(inputId  = "send_message",    label = "Send!")
              ),

              # Show a plot of the generated distribution
              mainPanel(
                dataTableOutput("messages"),
                img(src = "woman_baby_wrapper.jpg", height = 656, width = 984)
              )
            )

)

Define server logic required to draw a histogram

server <- function(input, output) {

messages <- eventReactive(input$send_message,{ req(input$sid) req(input$token) req(input$from_number) req(input$to_number) req(input$message)

Sys.setenv(TWILIO_SID = input$sid)
Sys.setenv(TWILIO_TOKEN = input$token)
print(paste0("Message about to send ", input$message))
tw_send_message(to = as.character(input$to_number), from = as.character(input$from_number), body = input$message)

return(tw_get_messages_list())

})

output$messages <- renderDataTable(messages()) }

Run the application

shinyApp(ui = ui, server = server)

Challenges I ran into

Accomplishments that I'm proud of

What I learned

What's next for Teco

Built With

Share this project:
×

Updates