Skip to content

Commit 4a901ed

Browse files
Use sits key if rsi one is missing (#80)
1 parent 0cd7e50 commit 4a901ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/query_and_sign.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ rsi_query_api <- function(bbox,
119119
#' @export
120120
sign_planetary_computer <- function(items,
121121
subscription_key = Sys.getenv("rsi_pc_key")) {
122+
# check for the variable used by sits if the rsi one isn't set
123+
if (subscription_key == "") subscription_key <- Sys.getenv("MPC_TOKEN")
122124
if (subscription_key == "") {
123125
rstac::items_sign(items, rstac::sign_planetary_computer(rsi_user_agent))
124126
} else {

0 commit comments

Comments
 (0)