R/cloud_server.R

Defines functions cloud_server

cloud_server <- function(input, output, session) {
  
  shiny::observeEvent(input$run_github, {
    
    private_param <- switch(
      input$private_selection,
      Yes = TRUE,
      No = FALSE
    )
    
    rstudioapi::sendToConsole(
      paste0(
        "rrtools::use_github(", 
        "auth_token = \"", input$github_auth_token, "\",",
        "private = ", private_param, ",",
        ")"
      )
    )
    
    shiny::stopApp()
    
  })
  
}
nevrome/rrtools.addin documentation built on Nov. 3, 2018, 3:21 a.m.