Advertisement
Guest User

Untitled

a guest
Apr 17th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. var DiscoveryV1 = require('watson-developer-cloud/discovery/v1');
  2.  
  3. var discovery = new DiscoveryV1({
  4. username: '{username}',
  5. password: '{password}',
  6. version_date: '2016-12-01'
  7. });
  8.  
  9. discovery.createCollection(('{environment_id}', '{collection_name}', '{description}' '{configuration_id}'), function(error, data) {
  10. console.log(JSON.stringify(data, null, 2));
  11. });
  12.  
  13. var params;
  14. params = {description:'test',collection_name:'name test',environment_id:'xxxxxxx',
  15. configuration_id:'xxxxxxx'};
  16.  
  17. discovery.createCollection(params, function(error, data) {
  18. if(error){
  19. console.log(error);
  20. }
  21. console.log(JSON.stringify(data, null, 2));
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement