Skip to contents

Sets the internal URLS used to either the production or development (beta) SB server. URLS are stored internally to the package

Usage

set_endpoint(endpoint = c("production", "development"))

Arguments

endpoint

Indicate which SB endpoint you want to use options: c('production','development')

Author

Luke Winslow

Examples

# \donttest{
set_endpoint('prod')

# getting item from production SB servers
item_get('5060b03ae4b00fc20c4f3c8b')
#> <ScienceBase Item> 
#>   Title: MO Mineral Resource Microfilm
#>   Creator/LastUpdatedBy:      / 
#>   Provenance (Created / Updated):  2012-09-24T19:10:50Z / 2022-04-15T17:12:12Z
#>   Children: TRUE
#>   Item ID: 5060b03ae4b00fc20c4f3c8b
#>   Parent ID: 4f4e4761e4b07f02db47dfd0

set_endpoint('dev')
# getting item from beta SB servers
item_get('521e4686e4b051c878dc35d0')
#> <ScienceBase Item> 
#>   Title: GAGES-II: Geospatial Attributes of Gages for Evaluating Streamflow
#>   Creator/LastUpdatedBy:      / 
#>   Provenance (Created / Updated):  2013-08-28T18:50:46Z / 2014-07-05T01:51:56Z
#>   Children: FALSE
#>   Item ID: 521e4686e4b051c878dc35d0
#>   Parent ID: 521e43a1e4b051c878dc359a

# }