R/Authorization.R

#' Authorization for the Pinnacle API
#'
#' @param user Pinnacle Username
#' @param pwd  Pinnacle Password
#'
#'
authorization <- function (user,
                           pwd){
  
    CheckTermsAndConditions()
    if(missing(user)) user <- GetUsername()
    if(missing(pwd)) pwd <- GetPassword()
    credentials = paste(user,pwd,sep=":")
    credentials.r = charToRaw(enc2utf8(credentials))
    paste0("Basic ", jsonlite::base64_enc(credentials.r))

  }

Try the pinnacle.API package in your browser

Any scripts or data that you put into this service are public.

pinnacle.API documentation built on May 2, 2019, 10:24 a.m.