fkoh111 / fkoh111utils

Assorted utils :wrench: :construction_worker:
GNU Lesser General Public License v3.0
0 stars 0 forks source link

feature/inner_zz_config #63

Closed fkoh111 closed 4 years ago

fkoh111 commented 4 years ago

The following part will probably be used in several functions. Write a handle for these:

  if (prod == FALSE) {
    files_endpoint <- "https://sandbox.zamzar.com/v1/files"
  } 

  if (prod == TRUE) {
    files_endpoint <- "https://api.zamzar.com/v1/files"
  }

  if (is.null(usr)) {
    usr <- as.character(sample(999999:99999999, 1)) # Dummy username if nothing has been passed as param
  }

  status <- httr::GET(url = files_endpoint,
                config = httr::authenticate(
                  user = usr,
                  password = "",
                  type = "basic"
                )
  )
fkoh111 commented 4 years ago

On inner functions that will not be exported: https://stackoverflow.com/questions/35091361/creating-internal-functions-cant-be-called-from-console-in-r

fkoh111 commented 4 years ago

An alternative for data: http://tinyheero.github.io/jekyll/update/2015/07/26/making-your-first-R-package.html

fkoh111 commented 4 years ago

And: https://www.gastonsanchez.com/packyourcode/namespace.html

fkoh111 commented 4 years ago

Let this function utilize the original json config file from inside.... Alternatively use the data.