-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Open-EO/development
Release v1.0.0-rc.5
- Loading branch information
Showing
34 changed files
with
2,914 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ node_modules/ | |
/openeo.min.js | ||
/openeo.node.js | ||
/openeo.node.min.js | ||
types/ | ||
|
||
# Reports | ||
coverage/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Import the JS client | ||
const { OpenEO } = require('@openeo/js-client'); | ||
|
||
var url = "https://earthengine.openeo.org"; // Insert the openEO server URL here | ||
var connection = null; | ||
|
||
console.log('URL: ' + url); | ||
console.log('Client Version: ' + OpenEO.clientVersion()); | ||
|
||
OpenEO.connect(url) | ||
.then(c => { | ||
connection = c; | ||
return connection.capabilities(); | ||
}) | ||
.then(capabilities => { | ||
console.log('Server Version: ' + capabilities.apiVersion()); | ||
return connection.listCollections(); | ||
}) | ||
.then(collections => { | ||
console.log('Number of supported collections: ' + collections.collections.length); | ||
return connection.listProcesses(); | ||
}) | ||
.then(processes => { | ||
console.log('Number of supported processes: ' + processes.processes.length); | ||
return; | ||
}) | ||
.catch(err => console.error(err.message)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "@openeo/js-client-example-node", | ||
"version": "0.1.0", | ||
"author": "openEO Consortium", | ||
"contributors": [ | ||
{ | ||
"name": "Christoph Friedrich" | ||
}, | ||
{ | ||
"name": "Matthias Mohr" | ||
} | ||
], | ||
"description": "Example showcasing the usage of the openEO JavaScript client in Node.js", | ||
"license": "Apache-2.0", | ||
"homepage": "http://openeo.org", | ||
"bugs": { | ||
"url": "https://github.com/Open-EO/openeo-js-client/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Open-EO/openeo-js-client.git" | ||
}, | ||
"main": "discovery.js", | ||
"dependencies": { | ||
"@openeo/js-client": "1.0.0-rc.5" | ||
}, | ||
"scripts": { | ||
"start": "node discovery.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
discovery.js | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// import the JS client main part (OpenEO) for the actual functionality | ||
// and some classes (Connection, Capabilities) and types (Collections, Processes) for TypeScript stuff | ||
import { OpenEO, Connection, Capabilities, Collections, Processes } from '@openeo/js-client'; | ||
|
||
let url: string = "https://earthengine.openeo.org"; // Insert the openEO server URL here | ||
let connection: Connection = null; // Reserve a variable for the connection and specify its type | ||
|
||
console.log('URL: ' + url); | ||
console.log('Client Version: ' + OpenEO.clientVersion()); | ||
|
||
OpenEO.connect(url) | ||
.then((c: Connection): Capabilities => { // specify parameter type and return type | ||
connection = c; | ||
return connection.capabilities(); | ||
}) | ||
.then((capabilities: Capabilities): Promise<Collections> => { // as before, note the `Promise<>` generic | ||
console.log('Server Version: ' + capabilities.apiVersion()); | ||
return connection.listCollections(); | ||
}) | ||
.then((collections: Collections): Promise<Processes> => { // note that `Promise<Collections>` has become `Collections` | ||
console.log('Number of supported collections: ' + collections.collections.length); | ||
return connection.listProcesses(); | ||
}) | ||
.then((processes: Processes): void => { // final callback in chain doesn't return anything | ||
console.log('Number of supported processes: ' + processes.processes.length); | ||
return; | ||
}) | ||
.catch((err: Error) => console.error(err.message)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "@openeo/js-client-example-typescript", | ||
"version": "0.1.0", | ||
"author": "openEO Consortium", | ||
"contributors": [ | ||
{ | ||
"name": "Christoph Friedrich" | ||
}, | ||
{ | ||
"name": "Matthias Mohr" | ||
} | ||
], | ||
"description": "Example showcasing the usage of the openEO JavaScript client in Typescript", | ||
"license": "Apache-2.0", | ||
"homepage": "http://openeo.org", | ||
"bugs": { | ||
"url": "https://github.com/Open-EO/openeo-js-client/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Open-EO/openeo-js-client.git" | ||
}, | ||
"main": "discovery.ts", | ||
"dependencies": { | ||
"@openeo/js-client": "1.0.0-rc.5", | ||
"typescript": "^4.0.5" | ||
}, | ||
"scripts": { | ||
"build": "tsc discovery.ts", | ||
"start": "node discovery.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.