Closed henrykironde closed 2 years ago
I know this may not be the right place for this, but are there restrictions to the programing language used to interact with the API?
For example in R, this could be the same as
psw ="usgs-pass.json" # provide path to the file with password and username library(jsonlite) library(httr) api <- list( 'apiURL' = paste0('https://m2m.cr.usgs.gov/api/api/json/stable/'), 'apiKey' = NULL, 'loud_mode' = FALSE ) jsonData = fromJSON(psw) password <- as.matrix(jsonData$password) username <- as.matrix(jsonData$username) urln = paste0(api$apiURL, "login") userContext= NULL params <- list('username' = username, 'password' = password, 'userContext' = userContext) # res <- POST(urln, authenticate(username, password)) res <- POST(urln, body = params, encode = "json", user_agent("httr")) # res <- POST(urln, body = params) v <- content(res)$data
We are trying to revive usgs_login https://github.com/16EAGLE/getSpatialData, any help is much appreciated.
There are no such restrictions, or I don't know anything about them.
I know this may not be the right place for this, but are there restrictions to the programing language used to interact with the API?
For example in R, this could be the same as
We are trying to revive usgs_login https://github.com/16EAGLE/getSpatialData, any help is much appreciated.