Skip to content

Commit 8d4e917

Browse files
authored
Updated key/endpoint
Endpoints are not region-based anymore, but rather custom domain -based. Although regional endpoints will still work. Also, the authentication information is moving to a standard of getting it from environment variables.
1 parent 0d20f1e commit 8d4e917

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotnet/Search/BingEntitySearchv7.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ namespace EntitySearchSample
66
{
77
class Program
88
{
9-
static string host = "https://api.cognitive.microsoft.com";
9+
static string host = Environment.GetEnvironmentVariable("BING_ENTITY_SEARCH_ENDPOINT");
1010
static string path = "/bing/v7.0/entities";
1111

1212
static string market = "en-US";
1313

1414
// NOTE: Replace this example key with a valid subscription key.
15-
static string key = "ENTER YOUR KEY HERE";
15+
static string key = Environment.GetEnvironmentVariable("BING_ENTITY_SEARCH_SUBSCRIPTION_KEY");
1616

1717
static string query = "italian restaurant near me";
1818

@@ -38,4 +38,4 @@ static void Main(string[] args)
3838
}
3939

4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)