Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const DiscoveryV1 = require('watson-developer-cloud/discovery/v1');
- const fs = require('fs');
- const discovery = new DiscoveryV1({
- username: 'YOUR USERNAME',
- password: 'YOUR PASSWORD',
- version_date: DiscoveryV1.VERSION_DATE_2017_08_01
- });
- discovery.updateJsonDocument(
- {
- environment_id: 'YOUR ENVIRONMENT ID',
- collection_id: 'YOUR COLLECTION ID',
- configuration_id: 'YOUR CONFIGURATION ID',
- file: {},
- metadata: { foo: 'bar' }
- },
- function(error, data) {
- if (error) {
- console.log(error);
- } else {
- console.log(data);
- }
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement