A JavaScript REST API client for django-actinia or Actinia REST APIs.
grass-js-client works with django-actinia and Actinia 4.2.1.
https://openplainsinc.github.io/grass-js-client/
npm install grass-js-client
Set your api settings in src/settings.js
{
"API_HOST": "http://localhost:8005/savana",
"API_SOURCE": ["actinia", "openplains"],
"ACTINIA_VERSION": "4.2.1",
"LANGUAGE": "en",
"APP_NAME": "OpenPlains",
"APP_ICON": "",
"PLUGINS": [
{
"name": "actinia_statistic_plugin",
"version": "0.2.0"
},
{
"name": "actinia_satellite_plugin",
"version": "0.1.0"
},
{
"name": "actinia_metadata_plugin",
"version": "1.0.2"
},
{
"name": "actinia_module_plugin",
"version": "2.3.1"
},
{
"name": "actinia_stac_plugin",
"version": "0.1.0"
},
{
"name": "actinia_tiling_plugin",
"version": "1.0.0"
},
{
"name": "actinia_api",
"version": "3.3.0"
}
]
}
Make requests to the API...
import Grass from "Grass";
// Get a list of avaliable locations
let response = await Grass.routes.Locations.getLocations()
// Get info about a location
let info = await Grass.routes.Locations.getLocation('nc_spm_08')
More documentation to come...
Set up your node environment and install dependencies
nvm use
npm install
Run Jest test using the following commnad.
npm run lint
npm run test
Run Jest test using the following commnad.
npm run build
Run JSDocs to build docs into the /docs
directory
npm run docs