R/openCySwagger.R

Defines functions openCySwagger

Documented in openCySwagger

#' Open CySwagger docs in browser
#'
#' @description Opens swagger docs in default browser for a live
#' instance of CyREST or CyREST-supported operations.
#' @param domain (char) documentation domain or scope
#' @param base.url cyrest base url for communicating with cytoscape
#' @return Web page
#' @export
#' @examples
#' \donttest{
#' openCySwagger()
#' openCySwagger('commands')
#' }
#' @importFrom utils browseURL

openCySwagger<-function(domain='cyrest', base.url='http://localhost:1234/v1'){
    if(domain=='cyrest'){
        domain = ''
    }else{
        domain = paste('/',domain,sep='')
    }
    browseURL(paste(base.url,'/swaggerUI/swagger-ui/index.html?url=',base.url,domain,'/swagger.json#/',sep=""))
}
cytoscape/r2cytoscape documentation built on May 4, 2019, 6:36 p.m.