Advertisement
Guest User

Untitled

a guest
Sep 1st, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. const DiscoveryV1 = require('watson-developer-cloud/discovery/v1');
  2. const fs = require('fs');
  3.  
  4. const discovery = new DiscoveryV1({
  5. username: 'YOUR USERNAME',
  6. password: 'YOUR PASSWORD',
  7. version_date: DiscoveryV1.VERSION_DATE_2017_08_01
  8. });
  9.  
  10. discovery.updateJsonDocument(
  11. {
  12. environment_id: 'YOUR ENVIRONMENT ID',
  13. collection_id: 'YOUR COLLECTION ID',
  14. configuration_id: 'YOUR CONFIGURATION ID',
  15. file: {},
  16. metadata: { foo: 'bar' }
  17. },
  18. function(error, data) {
  19. if (error) {
  20. console.log(error);
  21. } else {
  22. console.log(data);
  23. }
  24. }
  25. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement