@@ -133,6 +133,7 @@ Vision.prototype.annotate = function(requests, callback) {
133133 } ) ;
134134} ;
135135
136+ // jscs:disable maximumLineLength
136137/**
137138 * Detect properties from an image (or images) of one or more types.
138139 *
@@ -156,9 +157,10 @@ Vision.prototype.annotate = function(requests, callback) {
156157 * For the response in the original format, review the `apiResponse` argument
157158 * your callback receives.
158159 *
159- * @param {string|string[]|module:storage/file|module:storage/file[] } images -
160- * The source image(s) to run the detection on. It can be either a local
161- * image path, a remote image URL, or a @google-cloud/storage File object.
160+ * @param {string|string[]|buffer|buffer[]|module:storage/file|module:storage/file[] } images - The
161+ * source image(s) to run the detection on. It can be either a local image
162+ * path, a remote image URL, a Buffer, or a @google-cloud/storage File
163+ * object.
162164 * @param {string[]|object= } options - An array of types or a configuration
163165 * object.
164166 * @param {object= } options.imageContext - See an
@@ -210,6 +212,20 @@ Vision.prototype.annotate = function(requests, callback) {
210212 * vision.detect(img, types, function(err, detection, apiResponse) {});
211213 *
212214 * //-
215+ * // Run feature detection over a Buffer.
216+ * //-
217+ * var level = require('level');
218+ * var db = level('./users-database');
219+ *
220+ * db.get('user-image', { encoding: 'binary' }, function(err, image) {
221+ * if (err) {
222+ * // Error handling omitted.
223+ * }
224+ *
225+ * vision.detect(image, function(err, detection, apiResponse) {});
226+ * });
227+ *
228+ * //-
213229 * // Supply multiple images for feature detection.
214230 * //-
215231 * var images = [
@@ -519,6 +535,7 @@ Vision.prototype.detect = function(images, options, callback) {
519535 } ) ;
520536 } ) ;
521537} ;
538+ // jscs:enable maximumLineLength
522539
523540/**
524541 * Run face detection against an image.
0 commit comments