File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,13 +270,13 @@ var DiscoveryV1 = require('watson-developer-cloud/discovery/v1');
270270var discovery = new DiscoveryV1 ({
271271 username: ' <username>' ,
272272 password: ' <password>' ,
273- version_date: DiscoveryV1 .VERSION_DATE_2016_12_15
273+ version_date: DiscoveryV1 .VERSION_DATE_2017_04_27
274274});
275275
276276discovery .query ({
277277 environment_id: ' <environment_id>' ,
278278 collection_id: ' <collection_id>' ,
279- query:
279+ query: ' my_query '
280280 }, function (err , response ) {
281281 if (err) {
282282 console .error (err);
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function DiscoveryV1(options) {
3131
3232 // Check if 'version_date' was provided
3333 if ( typeof this . _options . version_date === 'undefined' ) {
34- throw new Error ( 'Argument error: version_date was not specified, use DiscoveryV1.VERSION_DATE_2016_12_15 ' ) ;
34+ throw new Error ( 'Argument error: version_date was not specified, use DiscoveryV1.VERSION_DATE_2017_04_27 ' ) ;
3535 }
3636 this . _options . qs . version = options . version_date ;
3737}
@@ -46,6 +46,11 @@ DiscoveryV1.URL = 'https://gateway.watsonplatform.net/discovery/api';
4646 * @type {string }
4747 */
4848DiscoveryV1 . VERSION_DATE_2016_12_15 = '2016-12-15' ;
49+ /**
50+ * Release exposing the `sort` parameter on the `/query` endpoint
51+ * @type {string }
52+ */
53+ DiscoveryV1 . VERSION_DATE_2017_04_27 = '2017-04-27' ;
4954
5055/**
5156 * Return the list of environments
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const discovery = new DiscoveryV1({
1010 // password: 'INSERT YOUR PASSWORD FOR THE SERVICE HERE'
1111 username : 'YOUR USERNAME' ,
1212 password : 'YOUR PASSWORD' ,
13- version_date : DiscoveryV1 . VERSION_DATE_2016_12_15
13+ version_date : DiscoveryV1 . VERSION_DATE_2017_04_27
1414} ) ;
1515
1616discovery . getEnvironments ( { } , function ( error , data ) {
You can’t perform that action at this time.
0 commit comments