azure-search
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -231,2 +231,11 @@ var http = require('https') | ||
getDataSource: function (dataSourceName, cb) { | ||
if (!dataSourceName) throw new Error('dataSourceName is not defined') | ||
get(['datasources', dataSourceName], null, function (err, data) { | ||
if (err) return cb(err, null, data) | ||
if (data && data.error) return cb(data.error, null, data) | ||
cb(null, data, data) | ||
}) | ||
}, | ||
createDataSource: function (options, cb) { | ||
@@ -233,0 +242,0 @@ if (!options) throw new Error('options is not defined') |
{ | ||
"name": "azure-search", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "A client for the Azure Search service", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -148,3 +148,3 @@ # node-azure-search | ||
You can create, update and delete data sources: | ||
You can get, create, update and delete data sources: | ||
@@ -170,5 +170,8 @@ ```js | ||
}); | ||
client.getDataSource("dataSourceName", function(err, data) { | ||
//data source returned | ||
}); | ||
``` | ||
You can also create, update, list, get, delete, run and reset indexers: | ||
@@ -175,0 +178,0 @@ |
@@ -393,2 +393,10 @@ /* globals describe, it */ | ||
it('gets data source', function (done) { | ||
client.getDataSource('blob-datasource', function (err, data) { | ||
if (err) return done('error returned') | ||
if (!data) return done('datasource is null') | ||
return done() | ||
}) | ||
}) | ||
it('updates a blob data source', function (done) { | ||
@@ -395,0 +403,0 @@ var options = { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172073
1337
253