sign_bdc: Signature in hrefs provided by the STAC from the Brazil Data...

View source: R/signatures.R

sign_bdcR Documentation

Signature in hrefs provided by the STAC from the Brazil Data Cube project.

Description

To sign the hrefs with your token you need to store it in an environment variable in BDC_ACCESS_KEYor use acess_token parameter.

Usage

sign_bdc(access_token = NULL, ...)

Arguments

access_token

a character with the access token parameter to access Brazil Data Cube assets.

...

additional parameters can be supplied to the GET function of the httr package.

Value

a function that signs each item assets.

Examples

## Not run: 
 # STACItemCollection object
 stac_obj <- stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
   stac_search(collections = "CB4-16D-2",
               datetime = "2019-06-01/2019-08-01") %>%
   stac_search() %>%
   get_request()

 # signing each item href
 stac_obj %>% items_sign(sign_fn = sign_bdc(access_token = "123"))

## End(Not run)


rstac documentation built on Oct. 18, 2023, 1:15 a.m.