-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdiscovery.js
More file actions
26 lines (23 loc) · 790 Bytes
/
Copy pathdiscovery.js
File metadata and controls
26 lines (23 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Import the JS client
const { OpenEO } = require('@openeo/js-client');
const url = "https://earthengine.openeo.org"; // Insert the openEO server URL here
let 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);
})
.catch(err => console.error(err.message));