File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ var request = require('request');
22var FormData = require ( 'form-data' ) ;
33var fs = require ( 'fs' ) ;
44
5- var baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0/images/visualsearch' ;
6- var subscriptionKey = 'your-susbcription-key' ;
5+ // Add your Bing Search V7 endpoint to your environment variables.
6+ var baseUri = process . env [ 'BING_SEARCH_V7_ENDPOINT' ] + '/bing/v7.0/images/visualsearch' ;
7+ // Add your Bing Search V7 subscription key to your environment variables.
8+ var subscriptionKey = process . env [ 'BING_SEARCH_V7_SUBSCRIPTION_KEY' ]
79var imagePath = "path-to-your-image" ;
810
911var form = new FormData ( ) ;
@@ -21,4 +23,4 @@ form.getLength(function(err, length){
2123
2224function requestCallback ( err , res , body ) {
2325 console . log ( JSON . stringify ( JSON . parse ( body ) , null , ' ' ) )
24- }
26+ }
You can’t perform that action at this time.
0 commit comments