Skip to content

Commit

Permalink
add createWorkspace method
Browse files Browse the repository at this point in the history
  • Loading branch information
JAMES ZHANG committed May 4, 2016
1 parent 032cd80 commit 9fa3a46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test/integration/
test/resources/tts-output.ogg
.idea
doc/
.vscode/
21 changes: 16 additions & 5 deletions services/conversation/v1-experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ function Conversation(options) {
this._options = extend(serviceDefaults, options);
}

/**
* Retrieves the values for profile variables for specific client ID
* @param {Object} params { client_id: '', dialog_id: '', name:''}
*/
Conversation.prototype.workspaces = function(params, callback) {
params = params || {};

Expand All @@ -62,7 +58,22 @@ Conversation.prototype.workspaces = function(params, callback) {
return requestFactory(parameters, callback);
};

Conversation.prototype.createWorkspace;
Conversation.prototype.createWorkspace = function(params, callback) {
params = params || {};

var parameters = {
options: {
url: '/v1/workspaces/',
method: 'POST',
json: true,
body: pick(params, ['name', 'description', 'language', 'metadata'])
},
defaultOptions: this._options
};
return requestFactory(parameters, callback);
};


Conversation.prototype.deleteWorkspace;
Conversation.prototype.getWorkspace;
Conversation.prototype.updateWorkspace;
Expand Down

0 comments on commit 9fa3a46

Please sign in to comment.