Neanderthal Pudding Mix

    @openeo/js-client
    TypeScript icon, indicating that this package has built-in type declarations

    2.5.1 • Public • Published

    openeo-js-client

    JavaScript/TypeScript client for the openEO API.

    The version of this client is 2.5.1 and supports openEO API versions 1.x.x. Legacy versions are available as releases. See the CHANGELOG for recent changes.

    Usage

    This library can run in node.js or any recent browser supporting ECMAScript 2017. This excludes Internet Explorer, but includes Edge >= 15.

    An experimental Typescript declaration file is available so that you can use the library also in your TypeScript projects.

    Browser

    To use it in a browser environment simply add the following code to your HTML file:

    <script src="https://cdn.jsdelivr.net/npm/axios@0.21/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/oidc-client@1/dist/oidc-client.min.js"></script> <!-- Only required if you'd like to enable authentication via OpenID Connect -->
    <script src="https://cdn.jsdelivr.net/npm/multihashes@3/src/index.min.js"></script> <!-- Only required if you have checksums in the STAC metadata -->
    <script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>

    NodeJS

    To install it in a NodeJS environment run: npm install @openeo/js-client

    Afterwards, you can import the package: const { OpenEO } = require('@openeo/js-client');

    TypeScript

    Warning: The TypeScript integration is still experimental! Please help us improve it by opening issues or pull requests.

    To install it in a TypeScript environment run: npm install @openeo/js-client

    Afterwards, you can import the package: import { OpenEO } from '@openeo/js-client';

    Examples

    In the browser:

    In Node.js:

    In Typescript:

    More information can be found in the documentation.

    Development

    JS Client Tests

    Always make sure to adapt changes in the *.js files to the openeo.d.ts file. If changes are larger you may want to run npm run tsd and regenerate the declaration file and cherry-pick your changes from there.

    Generate a build: npm run build (generates openeo.js and openeo.min.js)

    Generate the documentation to the docs/ folder: npm run docs

    Check against the coding guidelines: npm run lint

    Run tests:

    • npm test (all tests)
    • npm test browser (browser tests)
    • npm test node (node tests)
    • npm test builder (tests only the process builder)
    • npm test earthengine (full test suite using the Google Earth Engine back-end as server)

    Interactive Web Editor

    There is an interactive web-based editor for coding using the openEO API, which is based on the JavaScript client. See https://github.com/Open-EO/openeo-web-editor for more details.

    Keywords

    none

    Install

    npm i @openeo/js-client

    Homepage

    openeo.org

    DownloadsWeekly Downloads

    6

    Version

    2.5.1

    License

    Apache-2.0

    Unpacked Size

    570 kB

    Total Files

    28

    Last publish

    Collaborators

    • m-mohr