Learn R Programming

rLandsat (version 0.1.1)

espa_user: Validate Espa Credentials

Description

To check espa credentials and if espa-api is responding. Suggest to use espa_creds function to store your credentials before running this function

Usage

espa_user(host = "https://espa.cr.usgs.gov/api/v1/", username = NULL,
  password = NULL)

Arguments

host

the api call host. Default set to espa v1 web api

username

default NULL, which fetches the username from the global environment. If defined otherwise, will run the api with the provided details

password

default NULL, which fetches the password from the global environment. If defined otherwise, will run the api with the provided details

Value

logical. TRUE if user is active, FALSE if credentials are wrong or API is unresponsive

Examples

Run this code
# NOT RUN {
## inputting the credentials
espa_creds("your_espaname", "secret_password")
## checking if the user is valid
espa_user() # returns FALSE

# }

Run the code above in your browser using DataLab